/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q13P Let MODEXP={ha,b,c,pi|a,b,c,and... [FREE SOLUTION] | 91影视

91影视

Let MODEXP={ha,b,c,pi|a,b,c,andpare positive binary integers such that abcmodp}.

Show that MODEXPP. (Note that the most obvious algorithm doesn鈥檛 run in polynomial time. Hint: Try it first where b is a power of 2 .)

Short Answer

Expert verified

The solution is,

MODEXP=a,b,c,p|a,b,candparebinaryintegerssuchthatab=c(modp)

Step by step solution

01

To Comparable Modulo

Throughout this segment, all of the numbers represent integers. If two integers differ by a multiple ofpforanyplargerthan1, we say they are comparable modulop.

The xyif the integers xandyare equal modulo pmodpWe'll call the lowest nonnegative yxmodp,wherexymodp.Every number modulo pis comparable to a member of the set Zp=0,...,p1.

02

To Algorithmmodulo Test

Whenever we state that p satisfies with Fermat test at a, we imply that aP-1modp

Assuming p satisfies the Fermat test at such a , we can get square roots of 1sinceaP-1modp=1, and soaP-1ap1/2modp is a square root of 1.

They prove first that maybe if phis prime, there is no witness, and hence no branch of the algorithm rejects ap1modp6=1. if a were a stage4 witness, and Fermat's little theorem predicts that p is composite

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91影视!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Show that the Post Correspondence Problem is undecidable over the binary alphabet.=0,1.

Question: Let B be the set of all infinite sequences over {0 , 1}. Show that B is uncountable using a proof by diagonalization.

This problem is inspired by the single-player game Minesweeper, generalized to an arbitrary graph. Let Gbe an undirected graph, where each node either contains a single, hidden mine or is empty. The player chooses nodes, one by one. If the player chooses a node containing a mine, the player loses. If the player chooses an empty node, the player learns the number of neighboring nodes containing mines. (A neighboring node is one connected to the chosen node by an edge.) The player wins if and when all empty nodes have been so chosen.

In the mine consistency problem, you are given a graphG along with numbers labeling some of G鈥檚 nodes. You must determine whether a placement of mines on the remaining nodes is possible, so that any node v that is labeled m has exactly m neighboring nodes containing mines. Formulate this problem as a language and show that it isNPcomplete.

Question:Consider the algorithm MINIMIZE, which takes a DFA as input and outputs DFA .

MINIMIZE = 鈥淥n input , where M=(Q,,,q0,A) is a DFA:

1.Remove all states of G that are unreachable from the start state.

2. Construct the following undirected graph G whose nodes are the states of .

3. Place an edge in G connecting every accept state with every non accept state. Add additional edges as follows.

4. Repeat until no new edges are added to G :

5. For every pair of distinct states q and r of and every a :

6. Add the edge (q,r) to G if q,a,r,a is an edge of G .

7. For each state q,let[q] be the collection of statesq={rQ|noedge joins q and r in G }.

8.Form a new DFA M'=Q',,',q'0,A'where

Q'={[q]|qQ}(ifq=r,onlyoneofthemisinQ'),'(q,a)=[q,a]foreveryqQanda,q00=[q0],andA0={[q]|qA}

9. Output ( M')鈥

a. Show that M and M' are equivalent.

b. Show that M0 is minimal鈥攖hat is, no DFA with fewer states recognizes the same language. You may use the result of Problem 1.52 without proof.

c. Show that MINIMIZE operates in polynomial time.

Let P=a,b.Give a CFG generating the language of strings with twice as manya'sasb's . Prove that your grammar is correct.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.