how to check relative prime numbers

7
Two integers are relatively prime (or coprime) if there is no integer greater than one that divides them both (that is, their greatest common divisor is one). For example, 12 and 13 are relatively prime, but 12 and14 are not. 12 and 13 are only divided by 1 Here GCD of 12 and 13 is 1. Read more at http://vustudents.ning.com/group/cs701theoryofcomputation/forum/t opics/mid-papers-2015#MBu0jeXlhE9J2R2B.99 How to find relatively prime numbers: -------------------------------------------- Q:How many numbers less than 40 are relatively prime to 40? a. The prime factorization of 40 is: 2^3 x 5^1 . b. Taking 2^3 first, we get: 2 - 1 = 1 and 2^3-1 = 4. c. Taking 5^1 we get: 5 - 1 = 4 and 5^1-1 = 1. d. Multiplying these together we get: (1)(4)(4)(1) or 16. e. The answer is 16. The numbers which are relatively prime are: 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, and 39. So indeed there are 16. Read more at http://vustudents.ning.com/group/cs701theoryofcomputation/forum/t opics/mid-papers-2015#MBu0jeXlhE9J2R2B.99 Ideal for solving relatively prime:

Upload: babar-saeed

Post on 28-Jan-2016

221 views

Category:

Documents


0 download

DESCRIPTION

This file tells how to check either two numbers are relatively prime or not

TRANSCRIPT

Page 1: How to Check Relative Prime Numbers

Two integers are relatively prime (or coprime) if there is no integer greater than one that divides them both (that is, their greatest common divisor is one). For example, 12 and 13 are relatively prime, but 12 and14 are not. 12 and 13 are only divided by 1 Here GCD of 12 and 13 is 1.Read more at http://vustudents.ning.com/group/cs701theoryofcomputation/forum/topics/mid-papers-2015#MBu0jeXlhE9J2R2B.99

How to find relatively prime numbers:

--------------------------------------------

Q:How many numbers less than 40 are relatively prime to 40?

a. The prime factorization of 40 is: 2^3 x 5^1 .

b. Taking 2^3 first, we get: 2 - 1 = 1 and 2^3-1 = 4.

c. Taking 5^1 we get: 5 - 1 = 4 and 5^1-1 = 1.

d. Multiplying these together we get: (1)(4)(4)(1) or 16.

e. The answer is 16. The numbers which are relatively prime are: 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, and 39. So indeed there are 16.

Read more at http://vustudents.ning.com/group/cs701theoryofcomputation/forum/topics/mid-papers-2015#MBu0jeXlhE9J2R2B.99

Ideal for solving relatively prime:

Question 3: Check for relatively prime 21 and 14Solution:  Given numbers are 21 and 14

factors of 21 is 1, 3, 7, 21

factors of 14 is 1, 2, 7, 14

GCD of (21,14) = 7

Page 2: How to Check Relative Prime Numbers

So 21 and 14 are not relatively prime.

Read more at http://vustudents.ning.com/forum/topics/mid-papers-2015?groupUrl=cs701theoryofcomputation&groupId=3783342%3AGroup%3A60059&id=3783342%3ATopic%3A5114052&page=2#comments#u4D2wLWMMgyrfYzU.99

CS 701 Paper time 2:30 30-1-2015Q1.Prove that k-tape turing machine and 1- tape turing machine time complexity.O(t(n)) == O (t2(n)) where 2 is square.Q2. Prove PCP decidable for unary alphabetQ3. Prove Atm is not mapping reduciable to EtmQ4. Prove that Turing recogniable languages are closed under concatenation.Q5. Find out PCP dominosQ6. 64 and 32965 are relative prime or not?Q7. 10 MCQs

Read more at http://vustudents.ning.com/forum/topics/mid-papers-2015?groupUrl=cs701theoryofcomputation&groupId=3783342%3AGroup%3A60059&id=3783342%3ATopic%3A5114052&page=2#comments#u4D2wLWMMgyrfYzU.99cs701 papertotal 80 marks ,17 Questions thy:10 mcq2 Q 15'15 marks k 3 Q 10'10 marks k1 Q 5 kaamake PCP domino:directed graph ko proof krna tha k p class ha ?prime numbers ki relivity prove krni thispcp ko prove krna tha k decidable ha ?

CS701Q1 three dominos di hoi thi match find krna tha 5 marksQ2 batana tha k relative prime hain ya nh 399 and 234 5 marksQ3 Atm is not mapping reducible to Etm prove krna tha 10 marksQ4 NOTSUB={<A,B>| there is some string wich is accepted by A but not by the turing machine B i-e language of A is not subset of language of Bis NOTSUB is decideable?Q5 T={(I,j,k)|I, j , k belong to N} show T is counable

Page 3: How to Check Relative Prime Numbers

Q6 PATH ={<G,s,t,k> | G is undirected graph, path between s& t is k }show krna tha k path class P ko belong krta hyRead more at http://vustudents.ning.com/forum/topics/mid-papers-2015?groupUrl=cs701theoryofcomputation&groupId=3783342%3AGroup%3A60059&id=3783342%3ATopic%3A5114052&page=2#comments#u4D2wLWMMgyrfYzU.99

cs701 papertotal 80 marks ,17 Questions thy:10 mcq2 Q 15'15 marks k 3 Q 10'10 marks k1 Q 5 kaamake PCP domino:directed raph ko proof krna tha k p class ha ?prime numbers ki relivity prove krni thispcp ko prove krna tha k decidable ha ?

CS701Q1 three dominos di hoi thi match find krna tha 5 marksQ2 batana tha k relative prime hain ya nh 399 and 234 5 marksQ3 Atm is not mapping reducible to Etm prove krna tha 10 marksQ4 NOTSUB={<A,B>| there is some string wich is accepted by A but not by the turing machine B i-e language of A is not subset of language of Bis NOTSUB is decideable?Q5 T={(I,j,k)|I, j , k belong to N} show T is counableQ6 PATH ={<G,s,t,k> | G is undirected graph, path between s& t is k }show krna tha k path class P ko belong krta hy

Read more at http://vustudents.ning.com/forum/topics/mid-papers-2015?groupUrl=cs701theoryofcomputation&groupId=3783342%3AGroup%3A60059&id=3783342%3ATopic%3A5114052&page=2#comments#u4D2wLWMMgyrfYzU.99

My today paperCS701Q1 one to one function k bary men tha......Q2 Batana tha k relative prime hain ya nai 1274 and 10505....Q3 LALL={<M>/ M is a TM with input alphabet ∑ and L(M)=∑*}Q4 T={(I,j,k)|I, j , k belong to N} show T is counable.

Page 4: How to Check Relative Prime Numbers

Q5 PATH ={<G,s,t,k> | G is undirected graph, path between s& t is k }show krna tha k path class P ko belong krta hyQ.6. Decidable function k bary men tha...Q.7 verify kerna tha k p class belong kerti ha G graph sy... CS_701 PaperThere were 10 MCQs 10 MarksQ17A Turing machine with stay put instead of left is similar to an ordinary Turing machine, but at eachPoint the machine can move its head right or let it stay in the same position. Show that this Turing machine variant is not equivalent to the usual version. What class of languages do these machines recognize? 15 Marks (PROBLEM 3.13 of Sipser book)Q16PATH ={< G,s, t>) I G is a directed graph that has a directed path from s to t}. Prove that PATH P.15 Marks (Theorem 7.14 of Sipser book)Q15In the silly Post Correspondence Problem, SPCP, in each pair the top string has the same length as the bottom string. Show that the SPCP is decidable. 10 Marks (PROBLEM 5.15 of Sipser book)Q14The collection of provable statements in Th(N,+,x) is Turing-recognizable. 10 Marks (Theorem 6.15 of Sipser book)Q13 Let MORE= {<A,B>} the language of A is larger than B. Prove that A or B is decideable. Consider either case. 10 Marks (Note : Wording of this question is not 100%)Q12 Find a match.05 MarksQ11 Consider the following pairs of numbers. Show that they are relatively prime or not.64 and 32965 05 Marks

Read more at http://vustudents.ning.com/forum/topics/mid-papers-2015?groupUrl=cs701theoryofcomputation&groupId=3783342%3AGroup%3A60059&id=3783342%3ATopic%3A5114052&page=2#comments#u4D2wLWMMgyrfYzU.99

It was mine paper cs701 at 26-1-15 2.30pmshow that the collection of turing recognizable language is closed under their union operation. Marks 10LALL={<M>/M is a TM with input alphabet ∑ and L(M)= ∑ * }. Prove that LALL is turing recognizable. Marks 10PATH ={<G,s,t,k> | G is undirected graph, path between s& t is k }show krna tha k path class P ko belong krta hy marks 15

Page 5: How to Check Relative Prime Numbers

show that 64, 32915 pair of number are prime or not. Marks 10from relations f(x) and g(n) values was given marks 5       CS 701 Theory of computation26/01/2015 time 2:30Total Questions 17(10 true n false, 7 are subjective)2 true false are from string belong to ∑3 are from mapping reducibility1 related to ATM1 is N=o(nlog log n)1 if turing machine with 2tape compute O(n) can a single tape compute in o(n2)A 5 marks question from relations f(x) and g(n) values was given15 marks question from SPATH of k length from the graph. Show that SPATH from P class5 marks q show that 64, 32915 pair of number are prime or not.10 marks q is related to TH(N,+,*).10 Usual turing machine having L, R, S, and Variant turing machine that has no Left move are equal and which class of language is accepted by these turing machines.

Read more at http://vustudents.ning.com/forum/topics/mid-papers-2015?groupUrl=cs701theoryofcomputation&groupId=3783342%3AGroup%3A60059&id=3783342%3ATopic%3A5114052&page=2#comments#u4D2wLWMMgyrfYzU.99

pahla, 5 no, PCP, domino, 10/1, 10/01, 01/10, 0/10, q 2, 5 marks, can we say, every problem is turing decidable, ????? prove, q 3, 5 marks, 64, 32965 are reltively prime or not, q 4, 10 marks,  Atm is not mappig reduable to Etm, prove by contradiction, q 5 time complexity of k-tape turing machi, eprove, t(n)=o(t^2(n)), 10 marks,  question 6 , 15 marks, Proove DFA equal to RERead more at http://vustudents.ning.com/forum/topics/mid-papers-2015?groupUrl=cs701theoryofcomputation&groupId=3783342%3AGroup%3A60059&id=3783342%3ATopic%3A5114052&page=3#comments#3T5j1uDX4UstLp5Q.99