CP7201 Theoretical foundations of computer science QUESTION BANK

Size: px
Start display at page:

Download "CP7201 Theoretical foundations of computer science QUESTION BANK"

Transcription

1 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 B 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}? 1

2 8. 9.Define an onto function: Define the terms partial function, domain, codomain and total function:- 13. Define recurrence relation:- 14. Define the reflexivity, transitivity, symmetry, antisymmetry of relations:- 2

3 Define an equivalence relation: Define Partial-order and Poset:- 3

4 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:- 4

5 (c) 7.(a) (b) (c) 8.(a) Define a Recurrence Relation:- 5

6 (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: (2n 1) = n2 UNIT-2 PART-A 6

7 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:- 7

8 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: 8

9 (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) 9 (!p!q).

10 (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 Morgan s 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 Morgan s 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. 10

11 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:- 11

12 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 Church s Thesis:- 12

13 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:- 13

14 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 14

15 Distinguish between call by value and call by name semantics:

16

17 8. 9. Prove the following:- 10. Prove the following:- 17

18 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:- 18

19 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 V 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 19

20 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. 20

21 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. 21

22 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? 22

23 2. 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 equivalent all 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 23

24 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:- 24

25 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: 25

26 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:Church Turing 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: 26

27 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: 27

28 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 n s followed by an asterisk followed by n s. The machine T should take this as input and produce as output a tape with n1 + n s. 28

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions Introduction Chapter 9 Graph Algorithms graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 2 Definitions an undirected graph G = (V, E) is

More information

Chapter 9 Graph Algorithms

Chapter 9 Graph Algorithms Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 3 Definitions an undirected graph G = (V, E)

More information

Introduction to Graph Theory

Introduction to Graph Theory Introduction to Graph Theory Tandy Warnow January 20, 2017 Graphs Tandy Warnow Graphs A graph G = (V, E) is an object that contains a vertex set V and an edge set E. We also write V (G) to denote the vertex

More information

Elements of Graph Theory

Elements of Graph Theory Elements of Graph Theory Quick review of Chapters 9.1 9.5, 9.7 (studied in Mt1348/2008) = all basic concepts must be known New topics we will mostly skip shortest paths (Chapter 9.6), as that was covered

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam

More information

Graph and Digraph Glossary

Graph and Digraph Glossary 1 of 15 31.1.2004 14:45 Graph and Digraph Glossary A B C D E F G H I-J K L M N O P-Q R S T U V W-Z Acyclic Graph A graph is acyclic if it contains no cycles. Adjacency Matrix A 0-1 square matrix whose

More information

Chapter 9 Graph Algorithms

Chapter 9 Graph Algorithms Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be if not careful with data structures 3 Definitions an undirected graph G = (V, E) is a

More information

Chapter 9 Graph Algorithms

Chapter 9 Graph Algorithms Introduction graph theory useful in practice represent many real-life problems can be if not careful with data structures Chapter 9 Graph s 2 Definitions Definitions an undirected graph is a finite set

More information

8.1 Polynomial-Time Reductions

8.1 Polynomial-Time Reductions 8.1 Polynomial-Time Reductions Classify Problems According to Computational Requirements Q. Which problems will we be able to solve in practice? A working definition. Those with polynomial-time algorithms.

More information

1. [5 points each] True or False. If the question is currently open, write O or Open.

1. [5 points each] True or False. If the question is currently open, write O or Open. University of Nevada, Las Vegas Computer Science 456/656 Spring 2018 Practice for the Final on May 9, 2018 The entire examination is 775 points. The real final will be much shorter. Name: No books, notes,

More information

NP-Completeness. Algorithms

NP-Completeness. Algorithms NP-Completeness Algorithms The NP-Completeness Theory Objective: Identify a class of problems that are hard to solve. Exponential time is hard. Polynomial time is easy. Why: Do not try to find efficient

More information

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices Hard Problems Euler-Tour Problem Undirected graph G=(V,E) An Euler Tour is a path where every edge appears exactly once. The Euler-Tour Problem: does graph G have an Euler Path? Answerable in O(E) time.

More information

4. (a) Draw the Petersen graph. (b) Use Kuratowski s teorem to prove that the Petersen graph is non-planar.

4. (a) Draw the Petersen graph. (b) Use Kuratowski s teorem to prove that the Petersen graph is non-planar. UPPSALA UNIVERSITET Matematiska institutionen Anders Johansson Graph Theory Frist, KandMa, IT 010 10 1 Problem sheet 4 Exam questions Solve a subset of, say, four questions to the problem session on friday.

More information

CS402 - Theory of Automata Glossary By

CS402 - Theory of Automata Glossary By CS402 - Theory of Automata Glossary By Acyclic Graph : A directed graph is said to be acyclic if it contains no cycles. Algorithm : A detailed and unambiguous sequence of instructions that describes how

More information

Graph Theory. Part of Texas Counties.

Graph Theory. Part of Texas Counties. Graph Theory Part of Texas Counties. We would like to visit each of the above counties, crossing each county only once, starting from Harris county. Is this possible? This problem can be modeled as a graph.

More information

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W. : Coping with NP-Completeness Course contents: Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems Reading: Chapter 34 Chapter 35.1, 35.2 Y.-W. Chang 1 Complexity

More information

Introduction III. Graphs. Motivations I. Introduction IV

Introduction III. Graphs. Motivations I. Introduction IV Introduction I Graphs Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Graph theory was introduced in the 18th century by Leonhard Euler via the Königsberg

More information

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE A Modern Approach to Discrete Mathematics SIXTH EDITION Judith L. Gersting University of Hawaii at Hilo W. H. Freeman and Company New York Preface Note to the

More information

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance. Algorithm Design Patterns and Anti-Patterns 8. NP and Computational Intractability Algorithm design patterns. Ex.! Greed. O(n log n) interval scheduling.! Divide-and-conquer. O(n log n) FFT.! Dynamic programming.

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam

More information

THEORY OF COMPUTATION

THEORY OF COMPUTATION THEORY OF COMPUTATION UNIT-1 INTRODUCTION Overview This chapter begins with an overview of those areas in the theory of computation that are basic foundation of learning TOC. This unit covers the introduction

More information

Varying Applications (examples)

Varying Applications (examples) Graph Theory Varying Applications (examples) Computer networks Distinguish between two chemical compounds with the same molecular formula but different structures Solve shortest path problems between cities

More information

Part II. Graph Theory. Year

Part II. Graph Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 53 Paper 3, Section II 15H Define the Ramsey numbers R(s, t) for integers s, t 2. Show that R(s, t) exists for all s,

More information

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 The entire examination is 925 points. The real final will be much shorter. Name: No books, notes, scratch paper, or calculators. Use pen

More information

Reference Sheet for CO142.2 Discrete Mathematics II

Reference Sheet for CO142.2 Discrete Mathematics II Reference Sheet for CO14. Discrete Mathematics II Spring 017 1 Graphs Defintions 1. Graph: set of N nodes and A arcs such that each a A is associated with an unordered pair of nodes.. Simple graph: no

More information

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ). MATH 139 W12 Review 1 Checklist 1 Exam Checklist 1. Introduction to Predicates and Quantified Statements (chapters 3.1-3.4). universal and existential statements truth set negations of universal and existential

More information

LOGIC AND DISCRETE MATHEMATICS

LOGIC AND DISCRETE MATHEMATICS LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University

More information

The Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems

The Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems The Turing Machine Unsolvable Problems Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical machine

More information

Combinatorics Summary Sheet for Exam 1 Material 2019

Combinatorics Summary Sheet for Exam 1 Material 2019 Combinatorics Summary Sheet for Exam 1 Material 2019 1 Graphs Graph An ordered three-tuple (V, E, F ) where V is a set representing the vertices, E is a set representing the edges, and F is a function

More information

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4) S-72.2420/T-79.5203 Basic Concepts 1 S-72.2420/T-79.5203 Basic Concepts 3 Characterizing Graphs (1) Characterizing Graphs (3) Characterizing a class G by a condition P means proving the equivalence G G

More information

8 NP-complete problem Hard problems: demo

8 NP-complete problem Hard problems: demo Ch8 NPC Millennium Prize Problems http://en.wikipedia.org/wiki/millennium_prize_problems 8 NP-complete problem Hard problems: demo NP-hard (Non-deterministic Polynomial-time hard), in computational complexity

More information

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance. Algorithm Design Patterns and Anti-Patterns Chapter 8 NP and Computational Intractability Algorithm design patterns. Ex.! Greed. O(n log n) interval scheduling.! Divide-and-conquer. O(n log n) FFT.! Dynamic

More information

DISCRETE MATHEMATICS

DISCRETE MATHEMATICS DISCRETE MATHEMATICS WITH APPLICATIONS THIRD EDITION SUSANNA S. EPP DePaul University THOIVISON * BROOKS/COLE Australia Canada Mexico Singapore Spain United Kingdom United States CONTENTS Chapter 1 The

More information

P and NP CISC5835, Algorithms for Big Data CIS, Fordham Univ. Instructor: X. Zhang

P and NP CISC5835, Algorithms for Big Data CIS, Fordham Univ. Instructor: X. Zhang P and NP CISC5835, Algorithms for Big Data CIS, Fordham Univ. Instructor: X. Zhang Efficient Algorithms So far, we have developed algorithms for finding shortest paths in graphs, minimum spanning trees

More information

CS521 \ Notes for the Final Exam

CS521 \ Notes for the Final Exam CS521 \ Notes for final exam 1 Ariel Stolerman Asymptotic Notations: CS521 \ Notes for the Final Exam Notation Definition Limit Big-O ( ) Small-o ( ) Big- ( ) Small- ( ) Big- ( ) Notes: ( ) ( ) ( ) ( )

More information

Discrete mathematics II. - Graphs

Discrete mathematics II. - Graphs Emil Vatai April 25, 2018 Basic definitions Definition of an undirected graph Definition (Undirected graph) An undirected graph or (just) a graph is a triplet G = (ϕ, E, V ), where V is the set of vertices,

More information

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs CS 311 Discrete Math for Computer Science Dr. William C. Bulko Graphs 2014 Definitions Definition: A graph G = (V,E) consists of a nonempty set V of vertices (or nodes) and a set E of edges. Each edge

More information

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,, CMPSCI 601: Recall From Last Time Lecture 5 Definition: A context-free grammar (CFG) is a 4- tuple, variables = nonterminals, terminals, rules = productions,,, are all finite. 1 ( ) $ Pumping Lemma for

More information

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 Algorithm Design Patterns and Anti-Patterns Algorithm design patterns.

More information

Assignment 4 Solutions of graph problems

Assignment 4 Solutions of graph problems Assignment 4 Solutions of graph problems 1. Let us assume that G is not a cycle. Consider the maximal path in the graph. Let the end points of the path be denoted as v 1, v k respectively. If either of

More information

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation

More information

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1 Introduction to Automata Theory BİL405 - Automata Theory and Formal Languages 1 Automata, Computability and Complexity Automata, Computability and Complexity are linked by the question: What are the fundamental

More information

P and NP CISC4080, Computer Algorithms CIS, Fordham Univ. Instructor: X. Zhang

P and NP CISC4080, Computer Algorithms CIS, Fordham Univ. Instructor: X. Zhang P and NP CISC4080, Computer Algorithms CIS, Fordham Univ. Instructor: X. Zhang Efficient Algorithms So far, we have developed algorithms for finding shortest paths in graphs, minimum spanning trees in

More information

Notation Index. Probability notation. (there exists) (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5.

Notation Index. Probability notation. (there exists) (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5. Notation Index (there exists) (for all) Fn-4 Fn-4 (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5 ( n ) k (binomial coefficient) CL-15 ( n m 1,m 2,...) (multinomial coefficient)

More information

Computer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth

Computer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth Computer Science and Mathematics Part I: Fundamental Mathematical Concepts Winfried Kurth http://www.uni-forst.gwdg.de/~wkurth/csm17_home.htm 1. Mathematical Logic Propositions - can be either true or

More information

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1 UNIT I INTRODUCTION CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1. Define Graph. A graph G = (V, E) consists

More information

Lecture 13. Reading: Weiss, Ch. 9, Ch 8 CSE 100, UCSD: LEC 13. Page 1 of 29

Lecture 13. Reading: Weiss, Ch. 9, Ch 8 CSE 100, UCSD: LEC 13. Page 1 of 29 Lecture 13 Connectedness in graphs Spanning trees in graphs Finding a minimal spanning tree Time costs of graph problems and NP-completeness Finding a minimal spanning tree: Prim s and Kruskal s algorithms

More information

Graphs. Introduction To Graphs: Exercises. Definitions:

Graphs. Introduction To Graphs: Exercises. Definitions: Graphs Eng.Jehad Aldahdooh Introduction To Graphs: Definitions: A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes) and E, a set of edges. Each edge has either one or two vertices associated

More information

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise. Final exam This is a closed book exam. No calculators are allowed. Unless stated otherwise, justify all your steps. You may use lemmas and theorems that were proven in class and on assignments unless stated

More information

Graphs. Pseudograph: multiple edges and loops allowed

Graphs. Pseudograph: multiple edges and loops allowed Graphs G = (V, E) V - set of vertices, E - set of edges Undirected graphs Simple graph: V - nonempty set of vertices, E - set of unordered pairs of distinct vertices (no multiple edges or loops) Multigraph:

More information

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph Graphs and Trees Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) who is connected to whom Web search views web pages as a graph Who points to whom Niche graphs (Ecology):

More information

Theory Bridge Exam Example Questions Version of June 6, 2008

Theory Bridge Exam Example Questions Version of June 6, 2008 Theory Bridge Exam Example Questions Version of June 6, 2008 This is a collection of sample theory bridge exam questions. This is just to get some idea of the format of the bridge exam and the level of

More information

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS DR. ANDREW SCHWARTZ, PH.D. 10.1 Graphs and Graph Models (1) A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes)

More information

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge. 1 Graph Basics What is a graph? Graph: a graph G consists of a set of vertices, denoted V (G), a set of edges, denoted E(G), and a relation called incidence so that each edge is incident with either one

More information

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G. MAD 3105 Spring 2006 Solutions for Review for Test 2 1. Define a graph G with V (G) = {a, b, c, d, e}, E(G) = {r, s, t, u, v, w, x, y, z} and γ, the function defining the edges, is given by the table ɛ

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics About the Tutorial Discrete Mathematics is a branch of mathematics involving discrete elements that uses algebra and arithmetic. It is increasingly being applied in the practical fields of mathematics

More information

Graphs (MTAT , 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402

Graphs (MTAT , 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402 Graphs (MTAT.05.080, 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402 homepage: http://courses.cs.ut.ee/2012/graafid (contains slides) For grade: Homework + three tests (during or after

More information

Graph Theory. Connectivity, Coloring, Matching. Arjun Suresh 1. 1 GATE Overflow

Graph Theory. Connectivity, Coloring, Matching. Arjun Suresh 1. 1 GATE Overflow Graph Theory Connectivity, Coloring, Matching Arjun Suresh 1 1 GATE Overflow GO Classroom, August 2018 Thanks to Subarna/Sukanya Das for wonderful figures Arjun, Suresh (GO) Graph Theory GATE 2019 1 /

More information

Trees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017

Trees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017 12. Graphs and Trees 2 Aaron Tan 6 10 November 2017 1 10.5 Trees 2 Definition Definition Definition: Tree A graph is said to be circuit-free if, and only if, it has no circuits. A graph is called a tree

More information

Multiple Choice Questions

Multiple Choice Questions Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Formal Language and Automata Theory Subject Code: CS 402 Multiple Choice Questions 1. The basic limitation of an FSM

More information

Some Hardness Proofs

Some Hardness Proofs Some Hardness Proofs Magnus Lie Hetland January 2011 This is a very brief overview of some well-known hard (NP Hard and NP complete) problems, and the main ideas behind their hardness proofs. The document

More information

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below: Chapter 4 Relations & Graphs 4.1 Relations Definition: Let A and B be sets. A relation from A to B is a subset of A B. When we have a relation from A to A we often call it a relation on A. When we have

More information

1 Digraphs. Definition 1

1 Digraphs. Definition 1 1 Digraphs Definition 1 Adigraphordirected graphgisatriplecomprisedofavertex set V(G), edge set E(G), and a function assigning each edge an ordered pair of vertices (tail, head); these vertices together

More information

Notation Index 9 (there exists) Fn-4 8 (for all) Fn-4 3 (such that) Fn-4 B n (Bell numbers) CL-25 s ο t (equivalence relation) GT-4 n k (binomial coef

Notation Index 9 (there exists) Fn-4 8 (for all) Fn-4 3 (such that) Fn-4 B n (Bell numbers) CL-25 s ο t (equivalence relation) GT-4 n k (binomial coef Notation 9 (there exists) Fn-4 8 (for all) Fn-4 3 (such that) Fn-4 B n (Bell numbers) CL-25 s ο t (equivalence relation) GT-4 n k (binomial coefficient) CL-14 (multinomial coefficient) CL-18 n m 1 ;m 2

More information

Recursively Enumerable Languages, Turing Machines, and Decidability

Recursively Enumerable Languages, Turing Machines, and Decidability Recursively Enumerable Languages, Turing Machines, and Decidability 1 Problem Reduction: Basic Concepts and Analogies The concept of problem reduction is simple at a high level. You simply take an algorithm

More information

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory Math.3336: Discrete Mathematics Chapter 10 Graph Theory Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall

More information

I BSc(Computer Science)[ ] Semester - II Allied:DISCRETE MATHEMATICS - 207D Multiple Choice Questions.

I BSc(Computer Science)[ ] Semester - II Allied:DISCRETE MATHEMATICS - 207D Multiple Choice Questions. 1 of 23 1/20/2018, 2:35 PM Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Reaccredited at the 'A' Grade Level by the NAAC and ISO 9001:2008

More information

r=1 The Binomial Theorem. 4 MA095/98G Revision

r=1 The Binomial Theorem. 4 MA095/98G Revision Revision Read through the whole course once Make summary sheets of important definitions and results, you can use the following pages as a start and fill in more yourself Do all assignments again Do the

More information

Paths. 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.

Paths. 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. Paths 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. Formal Definition of a Path (Undirected) Let n be a nonnegative integer

More information

WUCT121. Discrete Mathematics. Graphs

WUCT121. Discrete Mathematics. Graphs WUCT121 Discrete Mathematics Graphs WUCT121 Graphs 1 Section 1. Graphs 1.1. Introduction Graphs are used in many fields that require analysis of routes between locations. These areas include communications,

More information

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees Axiomatizing Arithmetic Logic: The Big Picture Suppose we restrict the domain to the natural numbers, and allow only the standard symbols of arithmetic (+,, =, >, 0, 1). Typical true formulas include:

More information

8.1 Polynomial-Time Reductions

8.1 Polynomial-Time Reductions Algorithm Design Patterns and Anti-Patterns Analysis of Algorithms Algorithm design patterns. Ex. Greed. O(n 2 ) Dijkstra s SSSP (dense) Divide-and-conquer. O(n log n) FFT. Dynamic programming. O(n 2 )

More information

Lecture 1: Examples, connectedness, paths and cycles

Lecture 1: Examples, connectedness, paths and cycles Lecture 1: Examples, connectedness, paths and cycles Anders Johansson 2011-10-22 lör Outline The course plan Examples and applications of graphs Relations The definition of graphs as relations Connectedness,

More information

P = NP; P NP. Intuition of the reduction idea:

P = NP; P NP. Intuition of the reduction idea: 1 Polynomial Time Reducibility The question of whether P = NP is one of the greatest unsolved problems in the theoretical computer science. Two possibilities of relationship between P and N P P = NP; P

More information

Chapter 8. NP-complete problems

Chapter 8. NP-complete problems Chapter 8. NP-complete problems Search problems E cient algorithms We have developed algorithms for I I I I I finding shortest paths in graphs, minimum spanning trees in graphs, matchings in bipartite

More information

Chapter 2 Graphs. 2.1 Definition of Graphs

Chapter 2 Graphs. 2.1 Definition of Graphs Chapter 2 Graphs Abstract Graphs are discrete structures that consist of vertices and edges connecting some of these vertices. Graphs have many applications in Mathematics, Computer Science, Engineering,

More information

ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007

ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007 ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007 This examination is a three hour exam. All questions carry the same weight. Answer all of the following six questions.

More information

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set

More information

ECS 20 Lecture 17b = Discussion D8 Fall Nov 2013 Phil Rogaway

ECS 20 Lecture 17b = Discussion D8 Fall Nov 2013 Phil Rogaway 1 ECS 20 Lecture 17b = Discussion D8 Fall 2013 25 Nov 2013 Phil Rogaway Today: Using discussion section to finish up graph theory. Much of these notes the same as those prepared for last lecture and the

More information

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which: P R O B L E M S Finite Autom ata. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which: a) Are a multiple of three in length. b) End with the string

More information

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2 2.2 Set Operations 127 2.2 Set Operations Introduction Two, or more, sets can be combined in many different ways. For instance, starting with the set of mathematics majors at your school and the set of

More information

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4. Harper Langston New York University Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

More information

CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK

CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1 UNIT I INTRODUCTION CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK 1. Define Graph. 2. Define Simple graph. 3. Write few problems

More information

END-TERM EXAMINATION

END-TERM EXAMINATION (Please Write your Exam Roll No. immediately) Exam. Roll No... END-TERM EXAMINATION Paper Code : MCA-205 DECEMBER 2006 Subject: Design and analysis of algorithm Time: 3 Hours Maximum Marks: 60 Note: Attempt

More information

2.1 Sets 2.2 Set Operations

2.1 Sets 2.2 Set Operations CSC2510 Theoretical Foundations of Computer Science 2.1 Sets 2.2 Set Operations Introduction to Set Theory A set is a structure, representing an unordered collection (group, plurality) of zero or more

More information

Chapter 10 Part 1: Reduction

Chapter 10 Part 1: Reduction //06 Polynomial-Time Reduction Suppose we could solve Y in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Chapter 0 Part : Reduction Reduction. Problem X

More information

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV Sr.No. Question Option A Option B Option C Option D 1 2 3 4 5 6 Class : S.E.Comp Which one of the following is the example of non linear data structure Let A be an adjacency matrix of a graph G. The ij

More information

Binary Decision Diagrams

Binary Decision Diagrams Logic and roof Hilary 2016 James Worrell Binary Decision Diagrams A propositional formula is determined up to logical equivalence by its truth table. If the formula has n variables then its truth table

More information

NP and computational intractability. Kleinberg and Tardos, chapter 8

NP and computational intractability. Kleinberg and Tardos, chapter 8 NP and computational intractability Kleinberg and Tardos, chapter 8 1 Major Transition So far we have studied certain algorithmic patterns Greedy, Divide and conquer, Dynamic programming to develop efficient

More information

Graph Theory. ICT Theory Excerpt from various sources by Robert Pergl

Graph Theory. ICT Theory Excerpt from various sources by Robert Pergl Graph Theory ICT Theory Excerpt from various sources by Robert Pergl What can graphs model? Cost of wiring electronic components together. Shortest route between two cities. Finding the shortest distance

More information

Examples of P vs NP: More Problems

Examples of P vs NP: More Problems Examples of P vs NP: More Problems COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2017 Catch Up / Drop in Lab When Fridays, 15.00-17.00 Where N335, CSIT Building (bldg 108)

More information

W[1]-hardness. Dániel Marx. Recent Advances in Parameterized Complexity Tel Aviv, Israel, December 3, 2017

W[1]-hardness. Dániel Marx. Recent Advances in Parameterized Complexity Tel Aviv, Israel, December 3, 2017 1 W[1]-hardness Dániel Marx Recent Advances in Parameterized Complexity Tel Aviv, Israel, December 3, 2017 2 Lower bounds So far we have seen positive results: basic algorithmic techniques for fixed-parameter

More information

UNIT I PART A PART B

UNIT I PART A PART B OXFORD ENGINEERING COLLEGE (NAAC ACCREDITED WITH B GRADE) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS YEAR/SEM: III/V STAFF NAME: Dr. Sangeetha Senthilkumar SUB.CODE: CS6503 SUB.NAME:

More information

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95 Algorithms: Graphs Amotz Bar-Noy CUNY Spring 2012 Amotz Bar-Noy (CUNY) Graphs Spring 2012 1 / 95 Graphs Definition: A graph is a collection of edges and vertices. Each edge connects two vertices. Amotz

More information

Math 170- Graph Theory Notes

Math 170- Graph Theory Notes 1 Math 170- Graph Theory Notes Michael Levet December 3, 2018 Notation: Let n be a positive integer. Denote [n] to be the set {1, 2,..., n}. So for example, [3] = {1, 2, 3}. To quote Bud Brown, Graph theory

More information

CMSC Honors Discrete Mathematics

CMSC Honors Discrete Mathematics CMSC 27130 Honors Discrete Mathematics Lectures by Alexander Razborov Notes by Justin Lubin The University of Chicago, Autumn 2017 1 Contents I Number Theory 4 1 The Euclidean Algorithm 4 2 Mathematical

More information

P and NP (Millenium problem)

P and NP (Millenium problem) CMPS 2200 Fall 2017 P and NP (Millenium problem) Carola Wenk Slides courtesy of Piotr Indyk with additions by Carola Wenk CMPS 2200 Introduction to Algorithms 1 We have seen so far Algorithms for various

More information

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207.

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207. MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public.it-sudparis.eu/~gibson/teaching/mat7003/ Graphs and Trees http://www-public.it-sudparis.eu/~gibson/teaching/mat7003/l2-graphsandtrees.pdf

More information

F falling factorial, 11. father, 139. Ferris wheel, 112. Fibonacci numbers, 34, 36, 224, , 277. finite automaton, deterministic, 191.

F falling factorial, 11. father, 139. Ferris wheel, 112. Fibonacci numbers, 34, 36, 224, , 277. finite automaton, deterministic, 191. Subject Index The style of a page number indicates the nature of the text material: the style 123 indicates a definition, the style 123 indicates an extended discussion, and the style 123 indicates a short

More information

Definition of Graphs and Trees. Representation of Trees.

Definition of Graphs and Trees. Representation of Trees. Definition of Graphs and Trees. Representation of Trees. Chapter 6 Definition of graphs (I) A directed graph or digraph is a pair G = (V,E) s.t.: V is a finite set called the set of vertices of G. E V

More information