0% found this document useful (0 votes)
253 views5 pages

How To Check Relative Prime Numbers

- Two integers are relatively prime if their greatest common divisor is 1. For example, 12 and 13 are relatively prime but 12 and 14 are not. - The document provides examples and methods to determine if two integers are relatively prime or not. It explains how to find the prime factors and greatest common divisor. - It also includes sample problems and their solutions, such as determining that 64 and 32965 are not relatively prime since their greatest common divisor is not 1.

Uploaded by

Babar Saeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
253 views5 pages

How To Check Relative Prime Numbers

- Two integers are relatively prime if their greatest common divisor is 1. For example, 12 and 13 are relatively prime but 12 and 14 are not. - The document provides examples and methods to determine if two integers are relatively prime or not. It explains how to find the prime factors and greatest common divisor. - It also includes sample problems and their solutions, such as determining that 64 and 32965 are not relatively prime since their greatest common divisor is not 1.

Uploaded by

Babar Saeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

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/midpapers-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/midpapers-2015#MBu0jeXlhE9J2R2B.99

Ideal for solving relatively prime:


Question 3: Check for relatively prime 21 and 14
Solution:
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

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


Q1.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 alphabet
Q3. Prove Atm is not mapping reduciable to Etm
Q4. Prove that Turing recogniable languages are closed under concatenation.
Q5. Find out PCP dominos
Q6. 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.99
cs701 paper
total 80 marks ,
17 Questions thy:
10 mcq
2 Q 15'15 marks k
3 Q 10'10 marks k
1 Q 5 kaa
make PCP domino:
directed graph ko proof krna tha k p class ha ?
prime numbers ki relivity prove krni thi
spcp ko prove krna tha k decidable ha ?
CS701
Q1 three dominos di hoi thi match find krna tha 5 marks
Q2 batana tha k relative prime hain ya nh 399 and 234 5 marks
Q3 Atm is not mapping reducible to Etm prove krna tha 10 marks
Q4 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 B
is NOTSUB is decideable?
Q5 T={(I,j,k)|I, j , k belong to N} show T is counable

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 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
cs701 paper
total 80 marks ,
17 Questions thy:
10 mcq
2 Q 15'15 marks k
3 Q 10'10 marks k
1 Q 5 kaa
make PCP domino:
directed raph ko proof krna tha k p class ha ?
prime numbers ki relivity prove krni thi
spcp ko prove krna tha k decidable ha ?
CS701
Q1 three dominos di hoi thi match find krna tha 5 marks
Q2 batana tha k relative prime hain ya nh 399 and 234 5 marks
Q3 Atm is not mapping reducible to Etm prove krna tha 10 marks
Q4 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 B
is NOTSUB is decideable?
Q5 T={(I,j,k)|I, j , k belong to N} show T is counable
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 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 paper
CS701
Q1 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.

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 hy
Q.6. Decidable function k bary men tha...
Q.7 verify kerna tha k p class belong kerti ha G graph sy...
CS_701 Paper
There were 10 MCQs 10 Marks
Q17
A Turing machine with stay put instead of left is similar to an ordinary Turing machine, but at
each
Point 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)
Q16
PATH ={< 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)
Q15
In 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)
Q14
The 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 Marks
Q11 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.30pm


show that the collection of turing recognizable language is closed under their union operation.
Marks 10
LALL={<M>/M is a TM with input alphabet and L(M)= * }. Prove that LALL is turing
recognizable. Marks 10
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 marks 15

show that 64, 32915 pair of number are prime or not. Marks 10
from relations f(x) and g(n) values was given marks 5

CS 701 Theory of computation


26/01/2015 time 2:30
Total Questions 17(10 true n false, 7 are subjective)
2 true false are from string belong to
3 are from mapping reducibility
1 related to ATM
1 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 given
15 marks question from SPATH of k length from the graph. Show that SPATH from P class
5 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 RE
Read 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

You might also like