×

Close

- Theory Of Computation - TC
- Note
**M G University - MGU**- Computer Science Engineering
- B.Tech
**7 Views**- Uploaded 9 months ago

Introduction to the Theory of Computation The theory of computation is the branch of computer science that deals with whether and how efficiently problems can be solved on a model of computation, using an algorithm. The field is divided into two major branches: computability theory and complexity theory, but both branches deal with formal models of computation. In order to perform a rigorous study of computation, computer scientists’ work with a mathematical abstraction of computers called a model of computation. There are several models in use, but the most commonly examined is the Turing machine. A Turing machine can be thought of as a desktop PC with a potentially infinite memory capacity, though it can only access this memory in small discrete chunks. Computer scientists study the Turing machine because it is simple to formulate, can be analyzed and used to prove results, and because it represents what many consider the most powerful possible "reasonable" model of computation. It might seem that the potentially infinite memory capacity is an unrealizable attribute, but any decidable problem solved by a Turing machine will always require only a finite amount of memory. So in principle, any problem that can be solved (decided) by a Turing machine can be solved by a computer that has a bounded amount of memory. Set Theory Definition of sets A set is a well-defined collection of objects, called the elements or members of the set. No two elements in a set will be the same. ie, objects should not be repeated in a set. Sets may contain any type of object including numbers, symbols and even other sets. The objects of a set are called its "elements" or "members". eg: { 7,21,57 } Set membership Set non-membership eg: 7 { 7,21,57 } 8 { 7,21,57 } Set can be specified in two ways: i) Enumeration Method : In this method, the set is represented by listing the elements inside a pair of braces. Examples are { 1,4,9} , {Tom,Dick,Harry}. This method is also known as the Roster Method. ii) Rule Method : In this method, the set is represented by writing a rule defining the elements of the set and enclosing it by a pair of braces. For example, the set {2,3,4} can be written as {x/x is an

integer between 1 and 5}. The following symbols are usually used to represent certain types of numbers: N – set of all natural numbers Z – set of all integers Q – set of all rational numbers R – set of all real numbers Types of Sets a) Finite Set A set is said to be finite if the number of elements in the set is finite. In the case of an infinite set we cannot write a list of all the elements. ie, an infinite set contains infinitely many elements. eg: {1,2,3,4,5} finite set set of all natural numbers infinite set b) Empty Set A set having no elements is called the empty set or null set and is denoted as . The empty set is considered as a finite set. Eg: set of all integers between 1 and 2 c) Singleton set A set having only one element is called a singleton set. Eg: {x} {1} d) Subset If A and B are two sets then A is a subset of B if every member of A also is a member of B. It is represented by (A B). It may be noted that A A and the null set is a subset of every set. There are 2n subsets for every set where n is the number of elements in the set. Eg: The set Z of all integers is a subset of the set Q of all rational numbers. A={1,2,3,4} B={1,2,3,4} then A is a subset of B e) Proper Subset If A and B are two sets such that every element of A is in B and B contains elements which are not in A, then A is said to be a proper subset of B. It is represented by (A B). Here A is a subset of B but not equal to B. So there are 2n - 1 proper subset for a set having n elements. Eg: A={1,2,3,4} B={0,1,2,3,4,5} then A is a proper subset of B, if C={0,1,2,3,4,5} then C is NOT a proper subset of B f) Superset If A and B are two sets such that A is a subset of B, then we say that B is a superset of A and we denote this by B A. Eg: A={1,2,3,4} B={0,1,2,3,4,5} then B is a superset of A represented as BA

g) Equal sets Two sets A and B are said to be equal if they have the same elements or the sets A and B are equal if A B and B A. Eg: A={1,2,3} B={3,1,2} then A=B h) Universal set A number of given sets may be considered as the subsets of one large set. This large set is called the universal set, denoted by U. Eg: if we are dealing with the sets of even integers, odd integers and prime numbers, then we can take the set Z of integers or the set R of real numbers as the universal set. i) Power set A set whose elements are sets is known as family of sets or collection of sets. The family of all subsets of a set A is called the power set of A, denoted by P(A). If A has n elements, then P(A) has 2n elements. Eg: A={1,2,3} then P(A)={,{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}} Operations on Sets Let A and B be two sets, then i) Union ( ) Union of A and B (A B) is the set of all members in A and B into a single set, without repeating the elements. In symbols, A U B= { x/x A or x B} eg: A={1,2,3,4,5} B={2,4,6,8,10} then A B = {1,2,3,4,5,6,8,10} ii) Intersection ( ∩ ) Intersection of A and B (A ∩ B) is the set of those members common to both A and B. In symbols, A∩ B= { x/x є A and x є B} eg: A={1,2,3,4,5} B={2,4,6,8,10} then A ∩ B = {2,4} If A ∩ B= Ф then A and B are called "disjoint sets". iii) Difference of two sets ( - ) It is also known as relative complement. The difference of two sets A and B is the set of all those elements that belong to A but not belong to B. In symbols,

A – B={x/x A and x B} iv) Symmetrical Difference ( Δ ) Set of all those elements that belong to either A or B but not to both. In symbols, A Δ B={x/x A or x B but x A ∩ B} v) Complement Complement of set A is the set of all elements that do not belong to A. If U is the universal set and A U, then the complement of A with respect to U is the set of those elements of U which do not belong to A. A={x/x A and x U} It is easy to note that U = Ф, Ф = U and A = A. vi) Cartesian Product (x) A x B is the set of ordered pairs (a,b) such that a is in A and b is in B. Venn Diagram representation of sets Sets and their operations can be represented pictorially by means of Venn diagrams. The universal set is represented by a rectangular region and any set A is represented by a closed region.

## Leave your Comments