49+Slides--Complexity%2C+the+Class+P

# 49+Slides--Complexity%2C+the+Class+P - CS103 HO#49...

This preview shows pages 1–3. Sign up to view the full content.

CS103 HO#49 Slides--Complexity, the class P 5/20/11 1 maps to A B ¬ Decidable(A) ¬ Decidable(B) A language known not to be decidable A language whose decidability we are trying to determine If B decidable Then A decidable But A not decidable So B not decidable A m B Using Mapping Reductions: The Most Common Scenario Using Mapping Reductions: A Less Common Scenario maps to A B A language known to be decidable A language whose decidability we are trying to determine A m B Decidable(B) Decidable(A) If B decidable Then A decidable Left TM = { M, w | M on w tries to move its head left from the leftmost tape cell at some point in its computation } f M, w Decider for Left TM Accept Decider for A TM M', w' Reject If Left TM is decidable and we can produce a mapping function f that shows A TM m Left TM , we could build a decider for A TM . So, we can show Left TM is undecidable by defining a mapping that would work. The mapping f uses M, w to build M' and w' as follows: M' : M' first moves its input over one square to the right and writes a new symbol \$ on the leftmost square. Then M' simulates M on w'. If M' sees \$, it moves right and stays in the same state. If M accepts, M' moves all the way to the left and then tries to move left. w' = w For improper inputs, f outputs M', w'  Left TM . So M accepts w if and only if M' tries to move its head left from the leftmost cell. Left TM = { M, w | M on w tries to move its head left from the leftmost tape cell at some point in its computation } f M, w Decider for Left TM Accept Decider for A TM M', w' Reject Prove that A is decidable if and only if A m 0*1*. Proof. ( direction) Suppose that A is decidable. Then we can reduce A to 0*1* with the function computed by the following Turing machine F: F = "On input w: 1. Run a decider for A on w to determine whether w A. 2. If w A, output 01. 3. If w A, output 10." F w Decider for 0*1* Accept Decider for A 01 or 10 Reject Prove that A is decidable if and only if A m 0*1*. Proof. ( direction) Suppose that A is decidable. Then we can reduce A to 0*1* with the function computed by the following Turing machine F: F = "On input w: 1. Run a decider for A on w to determine whether w A. 2. If w A, output 01. 3. If w A, output 10." w A if and only if f(w) 0*1* A m 0*1* means there exists a computable function f such that

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS103 HO#49 Slides--Complexity, the class P 5/20/11 2 Complexity What makes some problems computationally hard and others easy? We do not have an answer to this question.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

49+Slides--Complexity%2C+the+Class+P - CS103 HO#49...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online