Discrete Math II Howon Kim 2017. 11.

Slides:



Advertisements
Similar presentations
CHAPTER 5 TOP-DOWN PARSING SUNG-DONG KIM, DEPT. OF COMPUTER ENGINEERING, HANSUNG UNIVERSITY.
Advertisements

Lesson 11 What’s Your Type? 여러분의 유형은 무엇인가요 ?. What job do you want to have in the future? 여러분은 미래에 어떤 직업을 갖고 싶은가 ? p.218.
숫자 ② 식당이 어디에 있어요? 식당이 4(사)층에 있어요. Sogang Korean 1A UNIT 1 “숫자②”
15 장. 알고리즘의 설계 알고리즘 설계 학습목표 기본 패턴 패턴의 한계점 일곱 가지 패턴의 알고리즘 설계 기법을 이해한다.
Lecture 9 프로그램 실행의 비용 computation cost – 시간 time, 메모리 memory – tractable vs intractable problems.
(Mathematical Induction)
C++ Tutorial 1 서강대학교 데이터베이스 연구실.
Compiler Lecture Note, Inroduction to FL theory
DS020 오토마타형식언어 Chapter 3. Regular Languages and Regular Grammars
Chapter 7 ARP and RARP.
6.9 Redundant Structures and the Unit Load Method
Shortest Path Algorithm
정 의 학습의 일반적 정의 기계학습(Machine Learning)의 정의
강좌 개요 2009년 1학기 컴퓨터의 개념 및 실습.
과목 홈페이지  전산학개론 이메일 숙제를 제출할 경우, 메일 제목은 반드시 ‘[전산학개론]’으로 시작.
알고리즘(Algorithm)  알고리즘 개요 (효율, 분석, 차수) Part 1 강원대학교 컴퓨터과학전공 문양세.
REINFORCEMENT LEARNING
7장 : 캐시와 메모리.
Internet Computing KUT Youn-Hee Han
Discrete Math II Howon Kim
오토메타 형식언어 2003년도 제 2학기.
제 5장. Context-Free Languages
학습목표 Turing Machine의 작동원리와 일반적인 계산모형으로서의 가능성 이해
Tel : Office : 2공학관 408호 오토마타 및 형식언어 김 현 성 Tel : Office : 2공학관 408호
Genetic Algorithm 신희성.
Chapter 7. PUSHDOWN AUTOMATA Exercises
Dynamic Programming.
Ch. 10 Algorithm Efficiency & Sorting
제 14 장 거시경제학의 개관 PowerPoint® Slides by Can Erbil
Chapter 2. Finite Automata Exercises
Discrete Math II Howon Kim
숭실대학교 마이닝연구실 김완섭 2009년 2월 8일 아이디어  - 상관분석에 대한 연구
11장. NP-완비NP-Completeness
계수와 응용 (Counting and Its Applications)
Chapter 4 The Von Neumann Model.
진대제 장관이 말하는 '100점짜리 인생의 조건' ▲ 진대제 정보통신부 장관    `인생을 100점짜리로 만들기 위한 조건은 무엇일까요`  진대제 정보통신부 장관이 대한상의 초청 조찬 간담회를 시작하며 참석자 들에게 던진 `조크성` 질문이다. 진 장관은 "제가 재미있는 얘기하나 하겠습니다"고 말하고, 
The Best Thing I've Learned This Year
이산수학(Discrete Mathematics)  증명 전략 (Proof Strategy)
제 4 장. Regular Language의 특성
Discrete Math II Howon Kim
Introduction to Programming Language
알고리즘(Algorithm)  알고리즘 개요 (효율, 분석, 차수) Part 년 봄학기
Discrete Math II Howon Kim
Dynamic Programming.
이산수학(Discrete Mathematics)  증명 방법 (Methods of Proof)
: 부정(negative)의 의미를 나타내는 접두사
Discrete Math II Howon Kim
알고리즘의 분석(analysis) 공간적 효율성(Space Efficiency)과 시간적 효율성(Time Efficiency)
13장. NP-완비NP-Completeness
이산수학(Discrete Mathematics) 비둘기 집 원리 (The Pigeonhole Principle)
이산수학(Discrete Mathematics)
Internet Computing KUT Youn-Hee Han
제12장. Algorithmic Computation의 한계
점화와 응용 (Recurrence and Its Applications)
창 병 모 숙명여대 전산학과 자바 언어를 위한 CFA 창 병 모 숙명여대 전산학과
PLEASE ENTER THE MAIN TITLE
이산수학(Discrete Mathematics)
The general form of 0-1 programming problem based on DNA computing
알고리즘의 분석(analysis) 공간적 효율성(Space Efficiency)과 시간적 효율성(Time Efficiency)
이산수학(Discrete Mathematics)  증명 전략 (Proof Strategy)
이산수학(Discrete Mathematics) 수열과 합 (Sequences and Summations)
제 3장. Regular Languages 와 Regular Grammars
Presentation by Timothy Kane
A SMALL TRUTH TO MAKE LIFE 100%
A SMALL TRUTH TO MAKE LIFE 100%
제10장. Other Models of TM’s 학습목표
[CPA340] Algorithms and Practice Youn-Hee Han
알고리즘의 분석(analysis) 공간적 효율성(Space Efficiency)과 시간적 효율성(Time Efficiency)
Chapter 7: Deadlocks.
Sawasdee ka.
Presentation transcript:

Discrete Math II Howon Kim 2017. 11

Agenda 1 Automata Theory 2 Regular Expression & Regular Languages 3 Finite Automata DFA(Deterministic Finite Automata) FA Applications 4 Non-deterministic Finite Automata 5 Grammars & Languages 6 Theory of Computations

Overview Set Theory of Strings (Chapter 6.1) Regular Expressions & Regular Languages Finite State Machines Deterministic Finite Automata (DFA) Non-deterministic Finite Automata (NFA) Grammars and Languages Types of Grammars and Languages Associated Machines including Turing Machine Computation Theory NP Problem

Computation Model Turing Machine : tape Finite control Deterministic / Non-deterministic

Complexity Two kinds of Complexity Polynomial Time (or Space) Time Complexity total amounts of state transitions (instructions) - the number of operations or running time needed, using the size of the input as its argument Space Complexity total amounts of space - A measure of the amount of computational space needed in the execution relative to the size of the input Polynomial Time (or Space) Time (or Space) Complexity : O(nc) - c is constant Exponential Time (or Space) Time (or Space) Complexity : O(2nc)

Classes P class PSPACE class EXP class 모든 입력에 대하여 polynomial time 내에 halt하면서 언어 L을 determine하는 TM이 존재하면, L  P. - The complexity class P contains every language that can be decided by a deterministic TM with polynomial time complexity. PSPACE class 모든 입력에 대하여 polynomial space 만을 사용하면서 언어 L을 determine하는 TM이 존재하면, L  PSPACE. - The complexity class PSPACE contains every language that can be decided by a deterministic TM with polynomial space complexity EXP class 모든 입력에 대하여 exponential time 내에 halt하면서 언어 L을 determine하는 TM이 존재하면, L  EXP.

Relation among classes (1) P  PSPACE Polynomial time 내에는 polynomial space 이상을 사 용할 수 없다. PSPACE  EXP Polynomial space를 사용하면서 만들어지는 TM의 모든 configuration은 exponential 하다. P  PSPACE  EXP

NP Class Definition of NP Class Non-deterministic Turing Machine Non-deterministic Polynomial time Definition of NP Class 모든 입력에 대하여 polynomial time 내에 halt하면서 언어 L을 determine하는 Non-deterministic TM이 존재하면, L  NP class. Non-deterministic Turing Machine A parallel Turing machine that can take many computational paths simultaneously Non-deterministic Turing Machine is like a deterministic TM, except that the transition function:  : a subset of ( (Q-H) )  ( Q{L,R,S} )

NP Class Intuitively, NP is the set of all decision problems for which the instances where the answer is "yes" have efficiently verifiable proofs of the fact that the answer is indeed "yes". More precisely, these proofs have to beverifiable in polynomial time by a deterministic Turing machine. In an equivalent formal definition, NP is the set of decision problems where the "yes"-instances can be accepted in polynomial time by a non-deterministic Turing machine. The equivalence of the two definitions follows from the fact that an algorithm on such a non-deterministic machine consists of two phases, the first of which consists of a guess about the solution, which is generated in a non-deterministic way, while the second consists of a deterministic algorithm that verifies or rejects the guess as a valid solution to the problem. http://en.wikipedia.org/wiki/NP_(complexity) NP는 대답이 "예"인 사례가 그 대답이 실제로 "예"라는 사실을 효율적으로 증명할 수있는 모든 결정 문제의 집합임

Relation among classes (2) P  NP, since L(DTM)  L(NTM) NP  PSPACE 어떤 NTM도 Polynomial time내에는 polynomial space 이상을 사용할 수 없다 P  NP  PSPACE  EXP

P vs. NP P versus NP problem Cook’s theorem : SAT  P  P = NP ? 현실에 존재하는 대부분의 문제는 P class or NP class에 속한다. P = NP ? Very important Open Problem If P and NP are not equivalent, then the solution of NP-problems requires (in the worst case) an exhaustive search, while if they are, then asymptotically faster algorithms may exist. The answer is not currently known. In a 2002 poll of 100 researchers, 61 believed the answer is no, 9 believed the answer is yes, 22 were unsure, and 8 believed the question may be independent of the currently accepted axioms, and so impossible to prove or disprove Cook’s theorem : SAT  P  P = NP ?

Cook Theorem Cook–Levin theorem(Cook's theorem) states that the Boolean satisfiability problem is NP-complete An important consequence of the theorem is that if there exists a deterministic polynomial time algorithm for solving Boolean satisfiability, then there exists a deterministic polynomial time algorithm for solving all problems in NP. Crucially, the same follows for any NP complete problem. That is, All problems in NP reduce to SAT (an example of NP-complete problem) If we can solve SAT, we can solve any of them NP-complete 문제는 거대한 군을 이루며, 서로 논리적 연결관계를 가지고 있음. 이 때문에, NP- complete중에서 한 문제를 (현실적 시간에)풀면 다른 문제도 쉽게 풀림(아직 이 문제에 대해 현실적 시 간(polynomial time)에 풀 수 있는 방법은 존재하지 않음) Cook Theorem은 SAT문제는 NP-complete이라는 것을 증명하는 정리로서, 모 든 NP 복잡도에 속하는 결정 문제는 polynomial time내에 SAT문제로 변환가 능함을 의미함 The question of whether such an algorithm exists is called the P=NP problem and it is widely considered the most important unsolved problem If there is an efficient algorithm for SAT, then P=NP

Some definitions on CNF, SAT, etc. 2-clause: (y∨z), k-clause: (y1∨…∨ yk) A CNF(Conjunctive Normal Form) is a conjunction(AND) of clauses. Every Boolean formula can be represented by a conjunctive normal form. A CNF F is satisfiable if F is true, that is, there is x∈{0,1}n such that F(x)≠0. The satisfiability problem is NP complete. 3-SAT formula (y1∨z1∨w1)∧…∧ (ym∨zm∨wm) k-Satisfiability problem (SAT problem) Input: k-SAT formula Problem : is the formula satisfiable ? Output : yes or no Cf. POS(Product of Sum)

SAT Problem SAT : CNF Satisfiability problem Reducibility : L1  L2  Deciding whether a given Boolean formula in conjunctive normal form (CNF) has an assignment that makes the formula "true." (어떤 CNF 논리식을 참으로 하는 논리변수 값이 존 재하는가?)  SAT  NP class & L ( NP class)  SAT Reducibility : L1  L2  If problem L1 is mapping reducible to problem L2, if problem L2 has been previously solved, then we can obtain a solution to problem L1  An algorithm for solving L2 can be translated into one for solving L1 in polynomial time  Solving L2 is at least as hard as solving L1

NP-hard NP-hard  A problem is NP-hard if an algorithm for solving it can be translated into one for solving any other NP-problem ( NP class). NP에 속하지 않고 P problem에 속하는 NP-hard 문제도 존재함(예: Halting Problem) It is much easier to show that a problem is NP than to show that it is NP- hard. 변형은 가능하지만, NP에 속하는지 증명하지 못함 NP : Non-deterministic algorithm in Polynomial time hard : as hard as any problem (the hardest problems) in NP L NP Reducible Polynomial Time NP-Complete Problem

NP-complete Def. of NP-complete Examples L  NP class and L  NP-hard NP-Complete Problem: A problem which is both NP (verifiable in nondeterministic polynomial time) and NP-hard (any NP-problem can be translated into this problem). Examples of NP-hard problems include the Hamiltonian cycle and traveling salesman problems. Examples CNF satisfiability (Cook Theorem), 0/1 Knapsack, Hamiltonic-cycle, Traveling Salesperson, Clique decision, etc. 변형 가능함 해가 주어졌을때, polynomial time내에 그 해가 yes라는 것을 결정할 수 있음 NP : Non-deterministic algorithm in polynomial time Complete : solve one, solve them all..

Example of NP-complete How to know another problem, A, is NP-complete? - To prove that A is NP-complete, reduce a known NP-complete problem to A Requirement for Reduction - Polynomial time - YES to A also implies YES to SAT, while No to A also implies No to SAT (Note that A must also have short proof for YES answer) reduction in P(n) solve A SAT A YES/NO

Summary : P, NP, NP-hard, NP-complete Polynomial time내에 yes/no를 대답할 수 있으면 P We say that a decision problem belongs to the class P if there is an algorithm A and a number c such that for every instance I of the problem the algorithm A will produce a solution in time O(B c), where B is the number of bits in the input string that represents I. NP Non-deterministic polynomial Yes인 해를 제공했을 때, yes라는 대답을 내는 해라는 것을 polynomial time 내에 확인 가능하면 NP NP is the class of decision problems for which it is easy to check the correctness of a claimed answer, with the aid of a little extra information. So we aren't asking for a way to find a solution, but only to verify that an alleged solution really is correct.

Summary : P, NP, NP-hard, NP-complete 다음 조건을 만족하는 어떤 문제 L은 NP-hard이다 모든 NP문제가 문제 L로 polynomial time에 변환 가능한 L 또한, 알려진 HP-hard 문제 A로부터 문제 L로 polynomial time에 변환 가능 한 L NP-hard는 NP에 속하는 모든 판정 문제를 다항 시간에 다대일 환산할 수 있는 문제들의 집합이다. 다시 말하면, NP-난해(hard)는 적어도 모든 NP 문제만큼은 어려운 문제들의 집합이다. 다시 말하면, NP-hard는 적어도 모든 NP 문제만큼은 어려운 문제들의 집합이다. 다음 조건을 만족하는 어떤 문제 L은 NP-complete이다 어떤 문제 L이 NP이고 L이 NP-hard일 경우 NP-complete은 NP-hard의 일부 즉, NP-complete은 NP-hard 중에서 NP인 문제들의 집합이다.

P and NP P=NP NP P (a) (b) We don’t know if (a) is true or (b) is true !

NP와 NP-Complete, NP-Hard의 관계 SAT We assume P  NP NP-hard 문제 중에서 NP인 문제들의 집합이 NP-complete인데, NP-complete을 P에 풀면 P=NP이고 반대로 풀수 없다는 것을 확인하면 P!=NP가 됨.

Write-only output tape Computation Model RAM (Random Access Machine) Load/Store, Add/Sub/Multi/Div, Read/Write, Jump, Halt Unit time의 operation으로 간주하는 theoretical model Program Accumulator Location counter Write-only output tape Read-only input tape