[ Prev ]
2022-04-21

-- Apr 20 In-Class Exercise Thread
Using the division algorithm, we can divided a
composite number represented as a binary string  by 
another number within polynomial time.
L = {<n, x> | n % x == 0} for composite numbers to be in P 
As division can be done in polynomial time, L belongs to P and NP.
(Edited: 2022-04-21)
<pre>Using the division algorithm, we can divided a composite number represented as a binary string by another number within polynomial time. L = {<n, x> | n % x == 0} for composite numbers to be in P As division can be done in polynomial time, L belongs to P and NP.</pre>

-- Apr 20 In-Class Exercise Thread
Resource Description for WhatsApp Image 2022-04-21 at 9.54.40 PM.jpeg
((resource:WhatsApp Image 2022-04-21 at 9.54.40 PM.jpeg|Resource Description for WhatsApp Image 2022-04-21 at 9.54.40 PM.jpeg))

-- Apr 20 In-Class Exercise Thread
If the verification is solved in polynomial time, it can be proved that COMPOSITE is in NP. We rewrite COMPOSITE = {<n> | <n, x> ∈ L}, L = {<n, x> | n % x == 0}. The algorithm used in L takes O(n) time and thus proves that L is in P and COMPOSITE in NP
If the verification is solved in polynomial time, it can be proved that COMPOSITE is in NP. We rewrite COMPOSITE = {<n> | <n, x> ∈ L}, L = {<n, x> | n % x == 0}. The algorithm used in L takes O(n) time and thus proves that L is in P and COMPOSITE in NP
2022-04-22

-- Apr 20 In-Class Exercise Thread
L= {<n, x> | n% x ==0} for composite numbers to belong in P. The values n and x can be passed to the algorithm to check if n%x==0. If the algorithm takes polynomial time to do the division(where n is the length of number in binary), then it is said to be in P and hence COMPOSITE is in NP.
L= {<n, x> | n% x ==0} for composite numbers to belong in P. The values n and x can be passed to the algorithm to check if n%x==0. If the algorithm takes polynomial time to do the division(where n is the length of number in binary), then it is said to be in P and hence COMPOSITE is in NP.

-- Apr 20 In-Class Exercise Thread
COMPOSITE = {<n> | <n,x> ∈ L}
L = {<n, x> | n % x == 0}
The COMPOSITE is in NP is the verification is solved in polynomial time.
L runs in order of O(n) so L is in P.
Thus, COMPOSITE is in NP.
(Edited: 2022-04-22)
COMPOSITE = {<n> | <n,x> ∈ L} L = {<n, x> | n % x == 0} The COMPOSITE is in NP is the verification is solved in polynomial time. L runs in order of O(n) so L is in P. Thus, COMPOSITE is in NP.

-- Apr 20 In-Class Exercise Thread
To show COMPOSITE is in NP, the algorithm must run in polynomial time. COMPOSITE = {<n> | <n,x> ∈ L} L = {<n, x> | n% x ==0} L runs in O(n) time, thereby proving that L is in P and COMPOSITE in NP.
To show COMPOSITE is in NP, the algorithm must run in polynomial time. COMPOSITE = {<n> | <n,x> ∈ L} L = {<n, x> | n% x ==0} L runs in O(n) time, thereby proving that L is in P and COMPOSITE in NP.
2022-04-24

-- Apr 20 In-Class Exercise Thread
L= {<n, x> | n% x ==0} for composite numbers to belong in P. The values n and x can be passed to the algorithm to check if n%x==0. If the algorithm takes polynomial time to do the division(where n is the length of number in binary), then it is said to be in P and hence COMPOSITE is in NP.
L= {<n, x> | n% x ==0} for composite numbers to belong in P. The values n and x can be passed to the algorithm to check if n%x==0. If the algorithm takes polynomial time to do the division(where n is the length of number in binary), then it is said to be in P and hence COMPOSITE is in NP.

-- Apr 20 In-Class Exercise Thread
L= {<n, x> | n% x ==0} for composite numbers to belong in P. An algorithm can check if n%x==0 for n and x passed as inputs. If the algorithm takes polynomial time to check, it is said to be in P. Therefore, COMPOSITE is in NP.
L= {<n, x> | n% x ==0} for composite numbers to belong in P. An algorithm can check if n%x==0 for n and x passed as inputs. If the algorithm takes polynomial time to check, it is said to be in P. Therefore, COMPOSITE is in NP.

-- Apr 20 In-Class Exercise Thread
As shown in the slides, to prove that COMPOSITE is in NP, we need to show that COMPOSITE has a verification algorithm that runs in polynomial time. The language can be written as follows: L = {<n, x> | n % x == 0}. Since we can do division in polynomial time, we can determine L to be in P, which also means COMPOSITE belongs to NP.
As shown in the slides, to prove that COMPOSITE is in NP, we need to show that COMPOSITE has a verification algorithm that runs in polynomial time. The language can be written as follows: L = {<n, x> | n % x == 0}. Since we can do division in polynomial time, we can determine L to be in P, which also means COMPOSITE belongs to NP.

-- Apr 20 In-Class Exercise Thread
Let COMPOSITE be the set of binary strings x which when viewed as a natural number are evenly divisible by some other natural number >1
We say a language L belongs to NP if there exists a two input polynomial-time algorithm A and a constant c such that L={x∈{0,1}⋆:βˆƒy,∣∣y∣∣=O(∣∣x∣∣c) and A(x,y)=1}
A (n,x) can be given as
L = { <n,x> | n%x ==0}
So for composite we get that n is a composite number and A( n,x) = 1 , we can also argue that using a the grade school division algorithm this can be obtained within polynomial time. So Composite is in NP.
Let COMPOSITE be the set of binary strings x which when viewed as a natural number are evenly divisible by some other natural number >1 We say a language L belongs to NP if there exists a two input polynomial-time algorithm A and a constant c such that L={x∈{0,1}⋆:βˆƒy,∣∣y∣∣=O(∣∣x∣∣c) and A(x,y)=1} A (n,x) can be given as L = { <n,x> | n%x ==0} So for composite we get that n is a composite number and A( n,x) = 1 , we can also argue that using a the grade school division algorithm this can be obtained within polynomial time. So Composite is in NP.
[ Next ]
X