--%>

Problem on Datalog for defining properties

The focus is on  the use of Datalog for defining properties  and queries on graphs.

(a) Assume that P is some property of graphs  definable in the Datalog. Show that P is preserved beneath extensions  and homomorphisms. That is, when G is a graph satisfying P, then for every supergraph of G (i.e., graph  extending G) satisfies  P, and  when h is a graph homomorphism, then h(G) satisfies P. Which of the below properties  and queries on graphs are definable in the Datalog?

(b) The number  of vertices  are even.

(c) There is a simple path (that is, a path without repeated vertices) of even length among two specified vertices.

(d) The binary relation? Having all pairs of vertices (a, b) for which  there  is a path of even length from a to b.

Given either a Datalog program stating the property or query or an argument why the property or query is not definable in the Datalog.

   Related Questions in Mathematics

  • Q : Law of iterated expectations for

     Prove the law of iterated expectations for continuous random variables. 2. Prove that the bounds in Chebyshev's theorem cannot be improved upon. I.e., provide a distribution that satisfies the bounds exactly for k ≥1, show that it satisfies the bounds exactly, and draw its PDF. T

  • Q : Who firstly use the finite-difference

    Who firstly use the finite-difference method?

  • Q : State Fermat algorithm The basic Fermat

    The basic Fermat algorithm is as follows: Assume that n is an odd positive integer. Set c = [√n] (`ceiling of √n '). Then we consider in turn the numbers c2 - n; (c+1)2 - n; (c+2)2 - n..... until a perfect square is found. If th

  • Q : Formal logic It's a problem set, they

    It's a problem set, they are attached. it's related to Sider's book which is "Logic to philosophy" I attached the book too. I need it on feb22 but feb23 still work

  • Q : Define Big-O notation Big-O notation :

    Big-O notation: If f(n) and g(n) are functions of a natural number n, we write f(n) is O(g(n)) and we say f is big-O of g if there is a constant C (independent of n) such that f

  • Q : Problem on Nash equilibrium In a

    In a project, employee and boss are working altogether. The employee can be sincere or insincere, and the Boss can either reward or penalize. The employee gets no benefit for being sincere but gets utility for being insincere (30), for getting rewarded (10) and for be

  • Q : How do it? integral e^(-t)*e^(tz) t

    integral e^(-t)*e^(tz) t between 0 and infinity for Re(z)<1

  • Q : Pig Game Using the PairOfDice class

    Using the PairOfDice class design and implement a class to play a game called Pig. In this game the user competes against the computer. On each turn the player rolls a pair of dice and adds up his or her points. Whoever reaches 100 points first, wins. If a player rolls a 1, he or she loses all point

  • Q : State Prime number theorem Prime number

    Prime number theorem: A big deal is known about the distribution of prime numbers and of the prime factors of a typical number. Most of the mathematics, although, is deep: while the results are often not too hard to state, the proofs are often diffic

  • Q : Formulating linear program of an oil

    An oil company blends two input streams of crude oil products alkylate and catalytic cracked to meet demand for weekly contracts for regular (12,000 barrels) mind grade ( 7,500) and premium ( 4,500 barrels) gasoline’s . each week they can purchase up to 15, 000