# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

5 Pages

### 18nh

Course: CMPT 710, Fall 2009
School: Sveriges...
Rating:

Word Count: 1097

#### Document Preview

Problem Primes Complexity 18-1 Complexity 18-2 The Instance: A positive integer k. Primes Question: Is k prime? The complement of Primes, the Composite problem, belongs to NP. Therefore Primes is in coNP Recently M.Agarwal et al. Proved that Primes can be solved in polynomial time (see http://www.cse.iitk.ac.in/news/primality.html) Complexity Andrei Bulatov However, the probabilistic algorithm we are going...

Register Now

#### Unformatted Document Excerpt

Coursehero >> Other International >> Sveriges lantbruksuniversitet >> CMPT 710

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Problem Primes Complexity 18-1 Complexity 18-2 The Instance: A positive integer k. Primes Question: Is k prime? The complement of Primes, the Composite problem, belongs to NP. Therefore Primes is in coNP Recently M.Agarwal et al. Proved that Primes can be solved in polynomial time (see http://www.cse.iitk.ac.in/news/primality.html) Complexity Andrei Bulatov However, the probabilistic algorithm we are going describe is far more efficient Complexity 18-3 Complexity 18-4 Residues For a positive integer n, we denote Z n the set {0,1,2,,n 1} Z + the set {1,2,,n 1} n Complexity of Arithmetic Given two integers, a and b, we can compute a + b in O(max(log a, log b)) a b in O(log a log b) a b cannot be computed in polynomial time, because the size of this number is blog a It is possible modulo n +,, x y addition, multiplication and exponentiation modulo n Z n together with these operations is called the set of residues modulo n Let b0 b1b2 K bk be the binary representation of b (k = log b) Then b = b0 2 0 + b1 21 + K + bk 2 k that implies Every integer m, positive or negative, has a corresponding residue m mod n For example, 17 mod 5 = 2 20 mod 5 = 0 -1 mod 5 = 4 a b (mod n ) = a b0 2 a b1 2 K a bk 2 0 1 k First, we consecutively compute a 2 , a 2 ,K, a 2 in O ( k log2 n ) Then we compute the product again in O ( k log2 n ) 0 1 k Complexity 18-5 Complexity 18-6 Prime and Coprime Fermats Theorem Integers a and b are called coprime if their greatest common divisor is 1 Theorem (Fermats Little Theorem) For example, 16 and 27 are coprime, and 15 and 18 are not Theorem (Chinese Remainder Theorem) If p and q are coprime then, for any a and b, there is x such that x a (mod p ) x b(mod q ) If p is prime then, for any a Z + we have a p1 1(mod p ) p If the converse were true, we could use it for a probabilistic primality test: Choose k residues modulo n; Compute their n 1 powers; For example, if p = 5, q = 3, and a = 2, b = 1, then x can be chosen to be 7 Accept if all results are 1 (mod n), reject otherwise 1 Complexity 18-7 Complexity 18-8 Carmichael Numbers Unfortunately, the converse is true just almost Definition A number n passes Fermats test if a n1 1(mod n) for all a coprime with n A number that passes Fermats test is called pseudo-prime Roots of 1 A square root of 1 modulo n is a number a such that a 2 1(mod n ) Clearly, 1 and -1 (that is n 1) are always roots of 1, but if n is composite, then it may have more than two roots of 1 For example, 8 has four roots of 1: 1, -1, 3, and 5 + One can straightforwardly check that, for any a 561 Z , coprime with 561, a 560 1(mod 561) 561 has eight: 1, -1, 188, 373 (find the remaining four) 561 is a Carmichael number n is said to be a Carmichael number if, for any prime divisor p of n, p 1 | n 1 Pseudo-prime = Prime + Carmichael Lemma Any Carmichael number has at least 8 roots of 1 Complexity 18-9 Complexity 18-10 Algorithm On input n if n is even, then if n = 2 accept, otherwise reject + select randomly a1 , a 2 ,K, a k Z n Analysis First we show that the algorithm does not give false negatives, that is it accepts all prime numbers If n = 2 then n is accepted. Let n be an odd prime number for i = 1 to k do - if a n 1 i 1(mod n ) then reject - let n 1 = st where s is odd and t = 2h is a power of 2 - compute the sequence ais2 , ais2 ,K, ais2 0 1 h Then n passes Fermat test modulo n - if ais2 1 then j n cannot be rejected in the last line, because n has only two roots of 1 let j be the maximal with this property if ais2 1 then reject j accept Complexity 18-11 Complexity 18-12 Next we show that if n is composite, then Pr[n accepted] 2 k A number a Z + such that a does not pass either Fermat test or the n square root test, is called a witness It is enough to prove that Pr[a is a witness] 1/2, or, in other words, that at least half of the elements of Z + are witnesses n For every nonwitness d we find a witness d such that if d1 d 2 then d '1 d ' 2 For a nonwitness a the sequence a s2 , a s2 ,K, a s2 1s only, or it contains -1 followed by 1s 0 1 h Let d be a nonwitness of the second type such that the 1 app...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Sveriges lantbruksuniversitet - LEC - 710
Complexity18-1Complexity18-2The ProblemPrimes Instance: A positive integer k.PrimesQuestion: Is k prime?The complement of Primes, the Composite problem, belongs to NP. Therefore Primes is in coNP Recently M.Agarwal et al. Proved that P
Sveriges lantbruksuniversitet - CMPT - 710
Complexity14-1Search and OptimizationComplexity Andrei BulatovComplexity14-2Search ProblemsOften we need to find a solution to some problem, rather than to show that a solution exists In this case the problem is said to be a search probl
Sveriges lantbruksuniversitet - LEC - 710
Complexity14-1Search and OptimizationComplexity Andrei BulatovComplexity14-2Search ProblemsOften we need to find a solution to some problem, rather than to show that a solution exists In this case the problem is said to be a search probl
Sveriges lantbruksuniversitet - CMPT - 710
Complexity23-1Complexity23-2A Non-Parallelizable ProblemLet us consider the TSP(D) problem Suppose there is a parallel algorithm solving this problem Then there is a sequential algorithm that simulates the parallel oneBoolean CircuitsBy
Sveriges lantbruksuniversitet - LEC - 710
Complexity23-1Complexity23-2A Non-Parallelizable ProblemLet us consider the TSP(D) problem Suppose there is a parallel algorithm solving this problem Then there is a sequential algorithm that simulates the parallel oneBoolean CircuitsBy
Sveriges lantbruksuniversitet - CMPT - 710
Complexity2-1Problems and LanguagesComplexity Andrei BulatovComplexity2-2Math Prerequisites Alphabets and LanguagesAn alphabet is a (finite) set of symbols, e.g. ={0,1}, ={0,1,9}, ={A,F,G,T}, ={a,b,c,z},A string (or a word) over an al
Sveriges lantbruksuniversitet - CMPT - 710
Complexity12-1Complexity12-2Non-deterministic MachinesRecall that if NT is a non-deterministic Turing Machine, then NT(x) denotes the tree of configurations which can be entered with input x, and NT accepts x if there is some accepting path
Sveriges lantbruksuniversitet - LEC - 710
Complexity12-1Complexity12-2Non-deterministic MachinesRecall that if NT is a non-deterministic Turing Machine, then NT(x) denotes the tree of configurations which can be entered with input x, and NT accepts x if there is some accepting path
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity27-1Computability and Complexity27-2The ProblemPrimes Instance: A positive integer k.PrimesQuestion: Is k prime?The complement of Primes, the Composite problem, belongs to NP. Therefore Primes is in coNP Rec
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity23-1Search and OptimizationComputability and Complexity Andrei BulatovComputability and Complexity23-2Search ProblemsOften we need to find a solution to some problem, rather than to show that a solution exists
Sveriges lantbruksuniversitet - CMPT - 710
Complexity16-1Complexity16-2Optimization and ErrorsIn an optimization problem, for every possible instance x we have: a set S(x) of feasible solutions; for every solution y S(x), we a positive goodness m(x,y); optimization parameter opt {m
Sveriges lantbruksuniversitet - LEC - 710
Complexity16-1Complexity16-2Optimization and ErrorsIn an optimization problem, for every possible instance x we have: a set S(x) of feasible solutions; for every solution y S(x), we a positive goodness m(x,y); optimization parameter opt {m
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity24-1ApproximationComputability and Complexity Andrei BulatovComputability and Complexity24-2Optimization ProblemsIn an optimization problem, for every possible instance x we have a set S(x) of feasible soluti
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity20-1Computability and Complexity20-2Reducing ProblemsWe have seen that polynomial time reduction between problems is a very useful concept for studying relative complexity of problems. It allowed us to distinguish
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity11-1Complexity of ProblemsComputability and Complexity Andrei BulatovComputability and Complexity11-2Classifying Problems We have seen that decision problems (and their associated languages) can be classified
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity13-1Computability and Complexity13-2Beyond P We have seen that the class P provides a useful model of &quot;easy&quot; computation This includes 2-Satisfiability and 2-Colourability But what about 3-Satisfiability and 3-C
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity25-1Computability and Complexity25-2Optimization and ErrorsIn an optimization problem, for every possible instance x we have: a set S(x) of feasible solutions; for every solution y S(x), we a positive goodness m(
Sveriges lantbruksuniversitet - CMPT - 308
CMPT 308 Computability and Complexity Exercises on Space Complexity and Optimisation. Due: Wednesday, November 30th (at the beginning of the class)Reminder: the work you submit must be your own. Any collaboration and consulting outside resourses mu
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity25-1Non-ApproximabilityComputability and Complexity Andrei BulatovComputability and Complexity25-2Optimization and ErrorsIn an optimization problem, for every possible instance x we have: a set S(x) of feasibl
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity31-1Parallel ArithmeticComputability and Complexity Andrei BulatovComputability and Complexity31-2Arithmetic OperationsA sequential algorithm can compute the sum of two integers, n and m, in O(max{log n, log
Sveriges lantbruksuniversitet - CMPT - 308
Computability and Complexity23-1Search and OptimizationComputability and Complexity Andrei BulatovComputability and Complexity23-2Search ProblemsOften we need to find a solution to some problem, rather than to show that a solution exists
Sveriges lantbruksuniversitet - CMNS - 253
Journals of Interest: Games &amp; Culture; Canadian Journal of Communication; New Media &amp; Society; Media, Culture &amp; Society; Science Technology &amp; Human Values; First MondaySome Articles w/ abstracts &amp; source informationBlogsTitle New Media and Intern
Sveriges lantbruksuniversitet - SCI - 19963
PROFILE OF STUDENTS IN SFU COURSES COURSE: ACMA 310-3 E03 LOCATION: SFU TITLE: COMPOUND INTEREST SECTION TYPE: LEC SEMESTER: 1996-3 ENROL: 28
Sveriges lantbruksuniversitet - SCI - 20023
Sheet1 PROFILE OF STUDENTS IN SFU COURSES COURSE: ACMA 310-3 E01 LOCATION: SFU TITLE: COMPOUND INTEREST SECTION TYPE: LEC SEMESTER: 2002-3 ENROL: 127 = PROGRAM OF STUDENT (Top 5 programs reported in each category Programs with &lt; 3 students not shown
Wilfrid Laurier - CPSC - 203
Instructors Manual Materials to AccompanyCOMPUTER CONFLUENCE CHAPTER 1 COMPUTER CURRENTS AND INTERNET WAVESKEY TERMSAgricultural ageA time when people lived and worked on farms, exchanging goods and services in nearby towns. Application program (
Air Force Academy - STA - 575
Wilfrid Laurier - CPSC - 331
Air Force Academy - STA - 575
INTRODUCTION The picture is simultaneously appalling and appealing - aninfant playing with what appears to be a pistol. The issue ischildren and firearms. What's wrong with the picture is that theissue of &quot;children&quot; and fir
Allan Hancock College - JAA - 200012
Western Australia Juries Amendment Act 2000 Western Australia Juries Amendment Act 2000 CONTENTS 1. Short title 1
East Los Angeles College - TH - 142
TH 142 Introduction to Theatre: Spring Term OutlineTaught by Pol Brown in 5S.4.5 Drama Teaching RoomDEVISING ISSUESThis part of the course will explore methods of creating your own work around issues which concern you. For example: social, person
Wilfrid Laurier - ENGO - 69910
ESTIMATION AND COMPUTATIONAL ANALYSISENGO 699.10 - J.A.R. Blais - 2009 1. LINEAR ALGEBRA - vector and function spaces - bases and related frames - inner and outer products - norms and induced metrics - weights and measures - Banach and Hilbert space
East Los Angeles College - TH - 241
CENTRE FOR THEATRE STUDIESDepartment of LiFTS _ SECOND YEAR PRACTICAL ASSIGNMENTTH241 SHAKESPEARE TO CHURCHILLPRESENTATIONSUsing TWO OR THREE texts you have studied this year, create an original piece of theatre that investigates a theme of you
Air Force Academy - STA - 575
Sveriges lantbruksuniversitet - C - 282
Chem 282September 26, 2008Lecture 8 Thermodynamic vs. kinetic control of reaction (cont.) o mild conditions (low temperature) cause the reaction to be irreversible and favor the kinetic product o vigorous conditions (high in temperature) cause th
Sveriges lantbruksuniversitet - ECON - 808
Chapter 0 Preliminaries0.1 My purpose in this courseFrom my perspective, the purpose of this course is to put you in a position to read and critically analyze journal articles in macroeconomics. Notice that the goal of teaching you macroeconomics
East Los Angeles College - EL - 441
EL 441 07Introduction to teaching young learnersWORK-SHEET FOR ZAGREB PRIMARY SCHOOLS VIDEO (Video 1 sequence 3; Video 2 sequence 1)Points to consider before viewingA Comparison of the two lessons 1. In what ways do you expect first year and fo
Sveriges lantbruksuniversitet - PHYS - 101
Chapter 18 Kinetic Theory of GasesCopyright 2009 Pearson Education, Inc.Units of Chapter 18 The Ideal Gas Law and the Molecular Interpretation of Temperature Distribution of Molecular Speeds Real Gases and Changes of Phase Vapor Pressure and
Sveriges lantbruksuniversitet - PHYS - 1010901
Chapter 18 Kinetic Theory of GasesCopyright 2009 Pearson Education, Inc.Units of Chapter 18 The Ideal Gas Law and the Molecular Interpretation of Temperature Distribution of Molecular Speeds Real Gases and Changes of Phase Vapor Pressure and
Sveriges lantbruksuniversitet - CMPT - 310
Intelligent AgentsChapter 2Chapter 21Outline Agents and environments Rationality PEAS (Performance measure, Environment, Actuators, Sensors) Environment types Agent typesChapter 22Agents and environmentssensors percepts environmen
Sveriges lantbruksuniversitet - CMPT - 310
Rational decisionsChapter 16Chapter 161Outline Rational preferences Utilities Money Value of informationChapter 162PreferencesAn agent chooses among prizes (A, B, etc.) and lotteries, i.e., situations with uncertain prizesA p LL
Sveriges lantbruksuniversitet - CMPT - 310
Vacuum-cleaner worldAIntelligent AgentsBChapter 2 Percepts: location and contents, e.g., [A, Dirty] Actions: Lef t, Right, Suck, N oOpChapter 21Chapter 24Outline Agents and environments Rationality PEAS (Performance measure, Envir
Sveriges lantbruksuniversitet - CMPT - 310
Artificial IntelligenceChapter 1Chapter 11Outline What is AI? A brief history The state of the artChapter 12What is AI?Systems that think like humans Systems that think rationally Systems that act like humans Systems that act ratio
Published in Helen L. Chick, Jill L. Vincent (Eds.), Proceedings of the 29th Conference of the International Group for the Psychology of Mathematics Education, University of Melbourne, Australia, Vol. 4, pp. 129-136.SYNCHRONIZING GESTURES, WORDS AN
East Los Angeles College - EL - 441
EL441IntroductiontoteachingyounglearnersSpringTerm2007 Session5:StorytellingintheFLYLclassroom Tutor:LizAustin04/22/091Suggestedreading1.Cameron L. 2001 Teaching Languages to Young Learners CUP (Chapter 7) Ellis G., Brewster J. and Gir
Sveriges lantbruksuniversitet - CMPT - 310
Acting humanly: The Turing testTuring (1950) Computing machinery and intelligence: Can machines think? Can machines behave intelligently? Operational test for intelligent behavior: the Imitation GameHUMAN HUMAN INTERROGATORArtificial Intellige
East Los Angeles College - EL - 641
EL441IntroductiontoteachingyounglearnersSpringTerm2007 Session5:StorytellingintheFLYLclassroom Tutor:LizAustin04/22/091Suggestedreading1.Cameron L. 2001 Teaching Languages to Young Learners CUP (Chapter 7) Ellis G., Brewster J. and Gir
Sveriges lantbruksuniversitet - CMPT - 310
Bayesian networksChapter 14.13Chapter 14.131Outline Syntax Semantics Parameterized distributionsChapter 14.132Bayesian networksA simple, graphical notation for conditional independence assertions and hence for compact specication of
East Los Angeles College - EL - 441
EL441TeachingYoungLearnersSpringTerm2007 Theoriesofchilddevelopment Tutors:LizAustin&amp;NiluferDemirkan04/22/091PiagetsstagesincognitivedevelopmentSensorimotor Preoperational. Concreteoperational. Formaloperations..02 27 .711 .11+
Sveriges lantbruksuniversitet - CMPT - 882
Hidden Markov ModelsAIMA Chapter 15, Sections 15AIMA Chapter 15, Sections 151Time and uncertaintyConsider a target tracking problem Xt = set of unobservable state variables at time t e.g., P ositiont, Appearancet, etc. Et = set of observable
East Los Angeles College - EL - 441
Materials EvaluationEL441 I ntroduction to theYL classroomDr Nilfe De irkan-Jone r m sELTCS pring 2007, S ssion 8 eNDJ / 09.03.20071Working with a coursebooks ache Thecoursebook provide thete r withll m a we thought out program e aching
East Los Angeles College - EL - 641
EL641InvestigatingtheyounglearnerclassroomSpringTerm2007 Session1Tutor:LizAustin Emaileaustin@essex.ac.uk Room:4.110 Courseofficehour:Wednesday1.002.0022/04/09EL641Investigatingtheyounglearerclassroom1Coursescope(5items) Childrenage
Sveriges lantbruksuniversitet - CMPT - 310
Temporal probability modelsChapter 15, Sections 15Chapter 15, Sections 151Outline Time and uncertainty Inference: ltering, prediction, smoothing Hidden Markov models Dynamic Bayesian networksChapter 15, Sections 152Time and uncertai
Wilfrid Laurier - CPSC - 589
Designing a Data Structure for Polyhedral SurfacesLutz Kettner: ETH Ziirich, Switzerland.AbstractDesignsolutionsfor a programlibrary arepresented combinatofor rial datastructuresin computationalgeometry,such asplanar maps and polyhedral surfaces
Wilfrid Laurier - CPSC - 441
Socket Programming with UDP(with ( ith some slides stolen f lid t l from Aj ) Ajay)CPSC 441 TUT (01 03) (01, TA: MINGWEI GONG EMAIL: GONGM@CPSC.UCALGARY.CAWHAT IS UDP?User Datagram ProtocolUnreliable Datagram Protocol?What is a datagram? Fro
Wilfrid Laurier - CPSC - 695
CPSC 695Future of GISMarina L. GavrilovaThe future of GISOverviewWhat is GIS now How GIS was viewed before Current trends and developments Future directions of researchWhat is GIS?Internet's definition of GIS:geographic(al) information sy
Sveriges lantbruksuniversitet - BUS - 435
How Competitive Forces Shape StrategyMichael E. PorterForces of competition are not limited to only direct competitors. Competition forces come from five sources: Potential new entrants Supplier power Buyer power Substitute products Current c
Sveriges lantbruksuniversitet - CS - 470
1 4 6X A 4 ) T A @B H ( U)DXS R0)SQIHHB &quot;3@ GE8C( \$DC@ F D D &amp; B A B qqlDeq5448 qlqrq qX642D0 qr ( 37 5 31 ) DDi rq qD0 qr ( ) xqnoxqi~r u u ruql{&amp;'rxuqfQ! le
Sveriges lantbruksuniversitet - GEOG - 440
RightsBlomley, N K (1994) Mobility, empowerment and the rights revolution, Political Geography, 13, 5, 407-422. Critical perspectives on rights: http:/cyber.law.harvard.edu/bridge/CriticalTh eory/rights.htm)1Outline Defining and categorizi
Sveriges lantbruksuniversitet - GEOG - 440
Kelo and the geographies of capitalismSusette Kelo, et al, v. City of New London, Connecticut, et al., 2005, 545 US 469. http:/judiciary.senate.gov/hearing.cfm?id=16121OutlineUrban revitalization in New London, CT Eminent domain Kelo: Public
Allan Hancock College - IPB - 1999241
1 Information Privacy Bill 1999 INFORMATION PRIVACY BILL 1999 EXPLANATORY NOTESGENERAL OUTLINEObjectives of the LegislationThis p
Sveriges lantbruksuniversitet - HIST - 20011
Sheet1 PROFILE OF STUDENTS IN SFU COURSES COURSE: HIST 337-4 D01 LOCATION: SFU TITLE: BALANCE OF POWER-EUR SECTION TYPE: LEC SEMESTER: 2001-1 ENROL: 28 = PROGRAM OF STUDENT (Top 5 programs reported in each category Programs with &lt; 3 students not show