Vous êtes sur la page 1sur 28

CP7201 Theoretical foundations of computer science

2014-2015

QUESTION BANK
UNIT-1
PART A
1. If A ans B are 2 sets with m and n elements respectively, what is the number of relations
Possible from A to B?
The number of relations possible from A to B is 2 mn
2. What are the 2 conditions for a relation to be a function?

All the elements of A are associated to elements of B.

Each element of A is associated to one and only one element of B, i.e. no element of A
is associated to two (or more) elements of B.

3. Define a function:Function f from set A to set B associates each element of A to unique (i.e. one and
only

one)

element

of

denoted

by

f: A B (read as f from A to B)
4. What are the 2 conditions for a relation to be a function?
If A and B be two non-empty sets,f be the relation from A to B then f is function from
A

to B iff:

a in A b in B such that (a,b) in f

x=y => f(x) = f(y) for all x,y in A.

5. What is a one-to-one function?


A function f: A B is said to be one-one function or injective if different elements
of A have different images in B.
6.What is the power set of the set {0,1,2}?

7.What is the Cartesian product of the set A= {1,2} and the set B = {a,b,c}?

St.Josephs College of Engineering

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

8.

9.Define an onto function:-

10.

11.

12.Define the terms partial function, domain, codomain and total function:-

13. Define recurrence relation:-

14. Define the reflexivity, transitivity, symmetry, antisymmetry of relations:-

St.Josephs College of Engineering

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

15.

16.

17.Define an equivalence relation:-

18.

19. Define Partial-order and Poset:-

St.Josephs College of Engineering

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

20.

PART B
1. (a) Explain the principle of mathematical induction:(b) Explain why mathematical induction is a valid proof technique:(c) Proof:-

2.(a)

(b) What are the 2 steps of Structural Induction?


(c)

3.(a) When is an algorithm defined recursive?


(b) Give a recursive algorithm for computing n!, where n is a non-negative integer.
4.(a) Construct a recursive version of a binary search algorithm.
(b) Give the recursive algorithm for merge sort:5.(a)What are the 2 basic counting principles?
(b) How many bit strings of length 7 are there?
(c)How many one-to-one functions are there from set A with m elements to set B with n elements?
6.(a)State the Pigeon Hole Principle:-

(b) State and prove the generalized pigeon hole principle:-

St.Josephs College of Engineering

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

(c)

7.(a)

(b)

(c)

8.(a) Define a Recurrence Relation:-

St.Josephs College of Engineering

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

(b)

(c)

9.(a) What is the difference between a set and a sequence? What is used in representing the relationship
between two elements of a set set or sequence?
(b). What is the difference between proof by strong induction and induction?
(c) Why proving the correctness of recursive algorithms is easier.
10. Prove the following by induction:1 + 3 + 5+ +(2n 1) = n2

UNIT-2
PART-A

St.Josephs College of Engineering

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

1. Define the syntax of Propositional logic:-

2.Define the terms atom, literal and clause in propositional Logic:-

3.Distinguish between satisfiability and validity of a propositional formula:-

4.Define conjunctive and disjunctive normal forms:-

St.Josephs College of Engineering

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

5.Define logical entailment by a knowledge base KB, which is a set of formulae:-

6. State the deduction theorem formally:-

7. What is Tautology? Explain with a simple example.


Tautology is a formula that is always true. E.g; (p p)
8.Which of the following statements are proposiotions?
Time now is 10 A.M.
Do not cross the road in haste
What is your schedule?
It is very sunny now
9. Define soundness and completeness:10. Write each of the following propositions in the abstracted/formula form.
(a) Paul reads The New York Times and watches the BBC News.
(b) Paul watches the BBC News or jogs 3 miles.
11. Write each of the following propositions in the abstracted/formula form.
(a) Paul does not read The New York Times and does not watch the BBC News.
(b) Paul reads The New York Times or watches the BBC News, but he does not jog 3 miles.

12. Construct truth tables for the following formulas. Use the truth tables to see if each formula is
valid or satisfiable:(a) P => P Q)

(b) ((P Q)
Q) P
13. Construct truth tables for the following formulas. Use the truth tables to see if each
formula is valid or satisfiable:St.Josephs College of Engineering

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

(a) (P Q)
P
Q
(b) P ( Q R)
(P Q)
(P R)

14.What is the difference between a valid formula and satisfiable formula?


Valid formula is a formula that is always true and satisfiable formula is a formula that is
sometimes true.
15. What is hypothetical syllogism?
E1 => E2, E2 => E3 ; Therefore E1 =>E3
16.Translate the following sentence to expression of predicate logic
No problem is difficult if there is enough effort.
Answer: Let problem x; d(x) difficult problem; e(x) problem with effort
x. (e(x) => ~d(x) ) where ~ is the not operator.
17. Translate the following predicate logic expression into English sentence
x. y.(Student(x) person(y) (friend(x,y) (betteratlogic(x,y)))
For every
student x, there exists a person y, who is a friend of x and who is better at
logic than x.
18. Draw the parse tree after correctly parenthesizing the following formula:p q p r q
19. Prove the validity of following sequent using natural deduction rules:(p q) (q r) (p r)
20. Translate the following English sentences into predicate logic formulas:

There are exactly 2 male students in this class:-

Everyone likes some food item.

21. State whether the following are true or false, where x , and y range over the integers:- Show
your work
x . y.(2x y = 0)
y. x .(2x y = 0)

PART-B
1. (a) Build the Truth table for the following expression for the conjunction of implication and its
inverse. That is, for the following expression: (p q)

St.Josephs College of Engineering

(!p !q).

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

(b) Show that (p q) (!p !q) is equivalent to (p q) (!p !q) from the Truth table constructed
in question 1 or using rules of propositional logic.
2. (a) What is Tautology? Explain with a simple example.
(b) Prove the following equivalence of De Morgans theorem by Truth Table. That is, show !(p q)
is equivalent to (!p !q)
3. (a) Use the following Conjunctive Normal Form (CNF) to explain the following terms: literal,
clause, and formula: (!a b c) (!a F) (!a !b !c)
(b) Express the following Disjunctive Normal Form formula into Conjunctive Normal Form using De
Morgans laws: (a !b !c) (a T) ( a b c)
(c) Is there a model for the above DNF? If there is one give its interpretation.
4.

Describe the following terms using the above DNF in question3 and draw the Venn diagram that
describes the relationship among these terms: Satisfiable, Valid, Unsatisfiable, and Falsifiable.

5. Write notes on SAT-solvers:6. Explain in detail about SLD resolution:7. Explain in detail about SLDNF resolution:8. Write notes on logic programming? Give an example program in PROLOG:9. Write down 8 laws of propositional logic that would help prove the propositions:10.Translate the following argument into a sequent in predicate logic using suitable set of predicate
symbols:
If there are tax payers, then all politicians are tax payers.
If there are any philanthropists, then all politicians are philanthropists.
So, if there are any tax paying philanthropists, then all politicians are philanthropists.
Prove the sequent in predicate logic.

UNIT-III
PART-A
1.What is the syntax of Lambda Calculus expression?

2.What is currying?
The strategy of nested one-variable functions used to represent multi-variable function is called
Currying.
St.Josephs College of Engineering

10

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

3.What are free and bound variables? Give example:-

4.What is beta reduction?

5.What is alpha reduction?

6. Define Eta-reduction:-

7. Define Delta-reduction:-

St.Josephs College of Engineering

11

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

8. What is a normal form of a lambda expression?

9. Distinguish between normal order and applicative order reduction strategies:-

10. State Church Rosser Theorem I:-

11. State Church-Rosser Theorem II:-

12. State Churchs Thesis:-

St.Josephs College of Engineering

12

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

13.

Briefly explain undecidability of halting problem:-

14. Explain call by name in the context of Lambda Calculus:-

15. Explain call by value in the context of Lambda calculus:-

16.Give the lambda expressions for the Boolean constants true and false:-

17.Give the lambda expressions for the set of logical operators: and or etc:-

St.Josephs College of Engineering

13

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

18.How do we represent natural numbers as lambda functions/abstractions?

19.How is addition of 2 numerals represented as lambda function?

20.How is successor function represented as a lambda function?

PART-B

St.Josephs College of Engineering

14

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

1.

2.

3. Distinguish between call by value and call by name semantics:-

4.

St.Josephs College of Engineering

15

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

5.

6.

7.

St.Josephs College of Engineering

16

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

8.

9. Prove the following:-

10. Prove the following:-

St.Josephs College of Engineering

17

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

UNIT: IV
PART A
1. Define a directed graph:A directed graph (or digraph) (V ,E) consists of a nonempty set of vertices V and a set of directed edges
(or arcs) E. Each directed edge is associated with an ordered pair of vertices. The directed edge
associated with the ordered pair (u, v) is said to start at u and end at v.
2. Define adjacency in a graph:Two vertices u and v in an undirected graph G are called adjacent (or neighbours) in G if u and v are
endpoints of an edge e of G. Such an edge e is called incident with the vertices u and v and e is said to
connect u and v.
3. Define neighborhood of a vertex in a graph:The set of all neighbours of a vertex v of G = (V ,E), denoted by N(v), is called the neighbourhood of v.
If A is a subset of V , we denote by N(A) the set of all vertices in G that are adjacent to at least one vertex
in A.
4. Define the degree of a vertex in a graph:The degree of a vertex in an undirected graph is the number of edges incident with it, except that a loop
at a vertex contributes twice to the degree of that vertex. The degree of the vertex v is denoted by deg (v).
5. Define complete and non-complete graphs:A complete graph on n vertices, denoted by Kn, is a simple graph that contains exactly one edge
between each pair of distinct vertices.
A simple graph for which there is at least one pair of distinct vertex not connected by an edge is called
non-complete.
6. Define a bipartite graph:-

St.Josephs College of Engineering

18

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

A simple graph G is called bipartite if its vertex set V can be partitioned into two disjoint sets V1 and V2
such that every edge in the graph connects a vertex in V1 and a vertex in V2 (so that no edge in G
connects either two vertices in V1 or two vertices in V2). When this condition holds, we call the pair (V1,
V2) a bipartition of the vertex set V of G.
7. What is the procedure to check if a graph is bipartite?
A simple graph is bipartite if and only if it is possible to assign one of two different colours to each
vertex of the graph so that no two adjacent vertices are assigned the same colour.
8. What is a complete bipartite graph?
A complete bipartite graph Km,n is a graph that has its vertex set partitioned into two subsets of m and
n vertices, respectively with an edge between two vertices if and only if one vertex is in the first subset
and the other vertex is in the second subset. |
9. When are 2 graphs isomorphic?
The simple graphs G1 = (V1,E1) and G2 = (V2,E2) are isomorphic if there exists a one to- one and onto
function f from V1 to V2 with the property that a and b are adjacent in G1 if and only if f (a) and f (b)
are adjacent in G2, for all a and b in V1.
10. What are the conditions to be satisfied for 2 graphs to be isomorphic?
A property preserved by isomorphism of graphs is called a graph invariant. Two isomorphic graphs have
the
1. Same number of edges
2. Same number of vertices
3. The degrees of the vertices in isomorphic simple graphs must be the same

11. Define the terms path, circuit, simple path and simple circuit:Path: A path is a sequence of edges that begins at a vertex of a graph and travels from vertex to
vertex along edges of the graph. Path is also referred to as walk.
Circuit: A path is a circuit if it begins and ends at the same vertex
Simple Path: A path or circuit is simple if it does not contain the same edge more than once.
Simple Circuit: A circuit is a simple circuit if it does not contain the same edge more than once

St.Josephs College of Engineering

19

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

12. Define strongly and weakly connected graph:A directed graph is strongly connected if there is a path from a to b and from b to a whenever a
and b are vertices in the graph.
A directed graph is weakly connected if there is a path between every two vertices in the
underlying undirected graph.
13. Define Euler circuit and Euler path in a graph:An Euler circuit in a graph G is a simple circuit containing every edge of G. An Euler path in G
is a simple path containing every edge of G.
14. Define graph colouring:A colouring of a simple graph is the assignment of a colour to each vertex of the graph so that no
two adjacent vertices are assigned the same colour.
15. What is chromatic number of a graph?
The chromatic number of a graph is the least number of colours needed for a colouring of that
graph.
16. State four colour theorem:The chromatic number of a planar graph is no greater than four.
17.What is a clique?
A clique is a subset of nodes such that each node is connected to all other nodes of the subset.
18. Define a tree:A tree is a connected undirected graph with no simple circuits.
19. What is a rooted tree and an m-ary tree?
A rooted tree is a tree in which one vertex has been designated as the root and every edge is
directed away from the root.
A rooted tree is called an m-ary tree if every internal vertex has no more than m children. The tree
is called a full m-ary tree if every internal vertex has exactly m children. An m-ary tree with m = 2
is called a binary tree.
20. Define a Spanning tree of a graph:Let G be a simple graph. A spanning tree of G is a sub-graph of G that is a tree containing every
vertex of G.

St.Josephs College of Engineering

20

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

PART B
1.a)Describe the generic graph classification simple, directed etc. Present your description in the form a
table. No need for extra textual description.
b)What are isomorphic graphs? Explain with an example. What are some pre-conditions that need to be
met by isomorphic graphs show them with examples:c) Two fully connected graphs each with 10 nodes are given are they isomorphic justify:2. Describe the term clique with an example.
Describe an algorithm to find the maximum clique in any given graph
Input: graph G(V, E), size V is n; Output should be the largest clique and its size.
Compute the approximate complexity of your algorithm in terms of number of vertices:What is the maximum clique size of Kn and what happens to this clique size when one of the vertices is
removed?

3. Find the height of full binary tree with 32 leaf nodes


Compute the number of nodes in that binary tree
Compute the number of Internal nodes of that binary tree
Is it possible to make such computation if the tree were not full justify with an example?
4. List the node processing sequence for pre-order, in-order, and post-order traversal of the following
binary tree.

St.Josephs College of Engineering

21

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

5.Give the algorithms for the following problems:

Finding Hamiltonian Cycle in a graph


Finding the largest independent set of a graph

6. Give the algorithms for the following problems:

Finding the shortest path between any two arbitrary nodes in the given graph.
Isomorphic graphs (given two arbitrary graphs show they are isomorphic or not)

7.Wtite the algorithms for the following problems:

Maximum clique
Maximum Independent Set

8. Give the algorithms for following problems:

Minimum Cut Vertex


Optimal Spanning Tree by removing cycles and loops

3. Draw K5 and K3,2 graphs.


4. What is the largest Clique size in the following graph:c

Illustrate Adjacency Matrix representation with the above graph.

UNIT-V
PART-A
1. What is a String?

St.Josephs College of Engineering

22

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2.

2014-2015

Define a Language:Definition: A language L is a subset of V*,

i.e. L V*.

a. A programming language can be thought of as the set of all possible programs, where a
program is a valid string (a very long string).
b. Programs with syntax errors are not in the set.
A language can be finite or infinite.
c. Programming languages are infinite.
d. i.e. there are an infinite number of programs.
3. Define a Grammar: A grammar is a way to specify the set of all legal sentences of a language (i.e. to specify the set of
all legal programs of a programming language).
Grammars are defined recursively (i.e. some elements are defined in terms of themselves).
Recursive definitions are also called inductive definitions (i.e. they induce, rather than enumerate,
the set of strings).
4.When do we say that a function is computable?
A function is computable if there is a computer program in some programming language that finds the
values of this function. If a function is not computable we say it is uncomputable.
5. What are the 3 equivalent computational processes?

All three computational processes (recursion, the -calculus, and the Turing machine) can be
shown to be equivalentall three approaches define the same class of functions.

6. Define a Phase-structure Grammar:

A phrase-structure grammar G = (V, T, S, P) consists of a vocabulary V , a subset T of V


consisting of terminal symbols, a start symbol S from V , and a finite set of productions P. The set

St.Josephs College of Engineering

23

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

V T is denoted by N. Elements of N are called nonterminal symbols. Every production in P must


contain at least one nonterminal on its left side.
7. Give a phrase-structure grammar that generates the set {0 n1n | n = 0, 1, 2, . . . }.
Two productions can be used to generate all strings consisting of a string of 0s followed by a string of the
same number of 1s, including the null string. The first builds up successively longer strings in the
language by adding a 0 at the start of the string and a 1 at the end. The second production replaces S with
the empty string. The solution is the grammar G = (V, T, S, P), where V = {0, 1, S}, T = {0, 1}, S is the
starting symbol, and the productions are:
S 0S1
S .
5. Define a finite state machine with output:Definition: A finite-state machine M = (S, I, O , f, g, s0) consists of a finite set S of states, a finite
input alphabet I, a finite output alphabet O, a transition function f that assigns to each state and input
pair a new state, an output function g that assigns to each state and input pair an output, and an initial
state s0.
9. What are the 2 types of FSM with output?
Mealy Machine: The output is determined by the transition between states. The state diagram includes
both input/output for every transition.
Moore Machine: The output is determined only by the resulting state. For each Mealy machine there
is an equivalent Moore Machine and vice-versa
10. When do we say that an FSM recognizes a string of input symbols?
A string x is said to be recognized or accepted by the machine M = (S, I, f, s0, F) if it takes the initial
state s0 to a final state, that is, f (s0, x) is a state in F. The language recognized or accepted by the
machine M, denoted by L(M), is the set of all strings that are recognize by M.
11. What is the condition for 2 FSMs to be equivalent?
Two FSMs are said to be equivalent if they both recognize/accept the same language.
12. Define a nondeterministic FSM:-

St.Josephs College of Engineering

24

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

A nondeterministic finite-state automaton M = (S, I, f, s0, F) consists of a set S of states, an input


alphabet I, a transition relation f that assigns a set of states to each pair of state and input (so that f :
S I P(S)), a starting state s0, and a subset F of S consisting of the final states.
13. What is the difference between a Turing Machine and a finite state machine:Intuitively, DFAs have no "scratch" memory at all; the configuration of a DFA is entirely accounted
for by the state in which it currently finds itself, and its current progress in reading the input.
Intuitively, TMs have a "scratch" memory in the form of tape; the configuration of a TM consists both
of its current state and the current contents of the tape, which the TM may change as it executes.
14. Define a decision problem with an example:A decision problem asks whether statements from a particular class of statements are true. Decision
problems are also known as yes-or-no problems.
Example:

Consider the class of statements each of which asks whether a particular integer n is prime. This
is a decision problem because the answer to the question Is n prime? is either yes or no.

15. Define decidability:When there is an effective algorithm that decides whether instances of a decision problem are true, we say
that this problem is solvable or decidable or computable.
Example of solvable problem: Given a number N, finding if N is a prime or not.
If no effective algorithm exists for solving a problem, then we say the problem is unsolvable or
undecidable.
Example: Halting Problem
Formal Definition:- Let be an alphabet and let A *be a language. We say that A is decidable, if
there exists a Turing machine M, such that for every string w *, the following holds:
1. If w A, then the computation of the Turing machine M, on the input string w, terminates in the
accept state.
2. If w A, then the computation of the Turing machine M, on the input string w, terminates in the
reject state.
In Halting problem, string w represents another TM B with its input.
16.Distinguish between a decision problem and a function problem:St.Josephs College of Engineering

25

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

To solve a decision problem, an algorithm has to accept each instance of the problem as input,
and return Yes or No depending on whether the instance is a Yes-instance.

To solve a function problem, an algorithm has to accept each instance I of the problem as input,
and return the unique sol(I).

We interpret algorithm as computable function.

17. Define Computability:A function that can be computed by a Turing machine is called computable and a function that cannot be
computed by a Turing machine is called un-computable.
18. State Church-Turing Thesis:ChurchTuring thesis states that given any problem that can be solved with an effective algorithm, there
is a Turing machine that can solve this problem.
Informally, the converse of this thesis suggests, that if a problem cannot be solved with Turing machine
then there is no effective algorithm for it.
19. What are P and NP problems?
A decision problem is in P, the class of polynomial-time problems, if it can be solved by a
deterministic Turing machine in polynomial time in terms of the size of its input.
That is, decision problem is in P if there is a deterministic Turing machine T that solves the decision
problem and a polynomial p(n) such that for all integers n, T halts in a final state after no more than
p(n) transitions whenever the input to T is a string of length n.
A decision problem is in NP, the class of nondeterministic polynomial-time problems, if it can be
solved by a nondeterministic Turing machine in polynomial time in terms of the size of its input.
That is, a decision problem is in NP if there is a nondeterministic Turing machine T that solves the
problem in a polynomial time p(n) such that for all integers n, T halts for every choice of transitions
after no more than p(n) transitions whenever the input to T is a string of length n.
16. Explain computational complexity with examples:

Complexity, typically represents the upper bound of the computational time of the algorithm for
an input of size n

Upper bound is not same as worst case time. It is larger than or equal to worst case time

Some Examples:

St.Josephs College of Engineering

26

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

Finding the smallest number in a given list n of unordered integers. This algorithm
execution

time is a function of n-1 comparisons. Thus, the complexity is n

(approximated)

Finding if a number exists in an ordered list of n numbers. In this case, there are log n
comparisons that dominate the algorithm.

PART-B
1. Explain the following terms: Big O notation, P, NP, NP-hard, NP-complete, tractable and intractable
problems:2. Concisely list the binary strings recognized by the following FSM:

3. a)Write the regular expression to find remove the # appearing at the beginning a given string S.
Replace # by $.
b)Compare Mealy machine with Moore machine
4. Let G be the grammar with vocabulary V = {S, A, 0, 1}, set of terminals T = {0,1}, starting
symbol S, and productions P = {S 0A, S 1010, A 101}. What is L(G), the language of
this grammar?
5. Draw a FSM to model a vending machine that dispenses a Pepsi when button P is pressed and
Coke when button C is pressed. This machine can take both 5 Rs or 10 Rs coin. If 5 Rs coin is
inserted, there is no change returned. If 10 Rs coin is inserted, then a 5 Rs coin is dispensed along
with a Coke/Pepsi.
6. a)Problem, Algorithms, and Complexity. Discuss the relationship among the three with an
example.
b)Order the Big O notation complexities listed here in the order of their increasing complexities:

St.Josephs College of Engineering

27

ISO 9001 - 2008

CP7201 Theoretical foundations of computer science

2014-2015

O(n2), O(n3), O(n), O(n log n), O(2n), O(nn), O(1), O(log n)
c) Describe the relationship between P and NP using Venn Diagram
7. Compute the complexity of Satisfiability algorithm that finds if a given propositional formula
with n variables is valid or not. Is this an NP-Complete problem?
8. Explain the relationship between TM and Church thesis
Describe the following aspects of Turing Machine: Operation, Components. List four Different
variations of TM.
9. Develop a Turing machine T that accepts Palindromes. Assume the following alphabet {a, b, B}.
The symbol B represents Blank character.
10. Build a Turing machine T that computes the function f (n1, n2) = n1 + n2. The pair (n1, n2) is
represented by a string of n1 + 1 1s followed by an asterisk followed by n2 + 1 1s. The machine T
should take this as input and produce as output a tape with n1 + n2 + 1 1s.

St.Josephs College of Engineering

28

ISO 9001 - 2008

Vous aimerez peut-être aussi