Extended Introduction to Computer Science CS1001.py Lecture 27: Starting to Recap
|
|
- Σάπφιρα Βασιλείου
- 7 χρόνια πριν
- Προβολές:
Transcript
1 Extended Introduction to Computer Science CS1001.py Lecture 27: Starting to Recap Instructors: Benny Chor, Amir Rubinstein Teaching Assistants: Michal Kleinbort, Yael Baran School of Computer Science Tel-Aviv University Spring Semester,
2 Lecture 27: Plan Cycles in Linked Lists An old Debt A high level view of algorithm, computational problems, and computational complexity. - Algorithmic approaches - A crash intro to the P vs. NP problem - Map coloring 2
3 Linked Lists An old debt Reminder: An alternative to using a contiguous block of memory, is to specify, for each item, the memory location of the next item in the list. We can represent this graphically using a boxes-andpointers diagram:
4 Linked Lists Representation (reminder) We introduce two classes. One for each node in the list, and another one to represent a list. The class Node is very simple, just holding two fields, as illustrated in the diagram. class Node (): def init (self, val): self.value = val self.next = None def repr (self): return str(self.value) # return "[" + str(self.value) + "," + str(id(self.next))+ "]" 4
5 Linked List class (reminder) class Linked_list (): def init (self): self.next = None # using same field name as in Node def repr (self): out = "" p= self.next while (p!= None ): out += str(p) + " p=p. next return out More methods will be presented in the next slides 5
6 Perils of Linked Lists With linked lists, we are in charge of memory management, and we may introduce cycles: >>> L = Linked_list() >>> L.next = L >>> L Can we check if a given list includes a cycle? 6 Here we assume a cycle may only occur due to the next pointer pointing to an element that appears closer to the head of the structure. But cycles may occur also due to the content field
7 Detecting Cycles: First Variant def detect_cycle1 (lst): dict ={ } p= lst while True : if (p == None ): return False if (p in dict ): return True dict [p] = 1 p = p.next Note that we are adding the whole list element ( box") to the dictionary, and not just its contents. Can we do it more efficiently? In the worst case we may have to traverse the whole list to detect a cycle, so O(n) time in the worst case is inherent. But can we detect cycles using just O(1) additional memory? 7
8 8 Detecting cycles: The Tortoise and the Hare Algorithm def detect_cycle2 ( lst ): # The hare moves twice as quickly as the tortoise # Eventually they will both be inside the cycle # and the distance between them will decrease by 1 every # time until they meet. slow = fast = lst while True : if ( slow == None or fast == None ): return if ( fast.next == None ): return slow = slow.next fast = fast.next.next if ( ): return True
9 9 Detecting cycles: The Tortoise and the Hare Algorithm def detect_cycle2 ( lst ): # The hare moves twice as quickly as the tortoise # Eventually they will both be inside the cycle # and the distance between them will decrease by 1 every # time until they meet. slow = fast = lst while True : if ( slow == None or fast == None ): return False if ( fast.next == None ): return False slow = slow.next fast = fast.next.next if ( slow is fast ): return True The same idea is used in Pollard's algorithm for factoring integers. If interested, take Benny's Intro to modern cryptography in 2 years
10 Testing the cycle detection algorithms The python file contains a function that converts a string to a linked list, and a function that introduces a cycle in a list. >>> lst = string_to_linked_list("abcde") >>> lst a b c d e >>> detect_cycle1(lst) False >>> create_cycle(lst,2,4) >>> detect_cycle1(lst) True >>> detect_cycle2(lst) True 10
11 Perils of Regular" Python Lists Even with non-linked lists, mutations may introduce cycles. In this example, either append or assign do the trick. >>> lst =["a","b","c","d","e"] >>> lst.append(lst) >>> lst ['a', 'b', 'c', 'd', 'e', [...]] >>> lst = ["a","b","c","d","e"] >>> lst[3] = lst >>> lst ['a', 'b', 'c', [...], 'e'] >>> lst[1] = lst >>> lst ['a', [...], 'c', [...], 'e'] 11 We see that Python recognizes such cyclical lists and [...] is printed to indicate the fact.
12 Computational Problems and Algorithms Two central notions in most CS courses What is a computational problem? A mapping input output What is an algorithm? A solution to a computational problem A series of operations that transforms input to output. What is an operation? Context dependent Levels of resolution: electron level bit level integer level (add, mult, read, write, compare, ) data structure level (list sort, matrix mult, tree insert) button click in a GUI 12
13 Algorithms In what ways can one describe an algorithm? Code (formal, in some programming language) Pseudo-code: less formal, but avoids the technical details Natural language (Hebrew, Arabic, Russian, Swahili, ) Flow diagram Animation Video Implementation of an algorithm A concrete mechanism capable of executing the algorithm (e.g. code) Execution of an algorithm Specific machine(s) at a specific time 13
14 Algorithmic Approaches Throughout the course, you have been exposed to several algorithmic approaches. When facing some computational problem, one should take into consideration these approaches, each with its pros and cons. Or invent a new approach 14
15 Iterative Algorithms Algorithms are not limited to a linear sequence of operations they usually include control structures. A basic control structure is the loop (an even more basic one is the conditional if). In low level languages (assembly), a loop is implemented with a goto statement. Most high-level programming languages include while and for loops. In Python, for loops are somewhat safer, as they are normally used to iterate over finite collections. This is not the case in all languages 15
16 Complexity A important measure for an algorithm's efficiency Time complexity number of operations / concrete time measurement as a function of the input size Space complexity maximal number of memory cells allocated simultaneously at any specific step of the algorithm as a function of input size Recall the key difference between time and space: time cannot be reused. c g(n) The O( ) notation a convenient formalization of complexity asymptotic correlates to "rate of growth" 16 rather than absolute number of operations hides multiplicative constants and negligible additives n 0 t(n) = O(g(n)) t(n)
17 Complexity of Iterative Algorithms Basic iterative patterns (c is some constant independent of n): O(n) 1. i = 1 2. while i < n: 3. i = i i = 1 2. while i < n: 3. i = i + c 1. i = n 2. while i > 1: 3. i = i - c (c >0) O(logn) 1. i = 1 2. while i < n: 3. i = i *2 1. i = 1 2. while i < n: 3. i = i *c 1. i = n 2. while i > 1: 3. i = i / c (c >1) O(???) 1. i = 2 2. while i < n: 3. i = i * i 1. i = 2 2. while i < n: 3. i = i**c 1. i = n 2. while i > 2: 3. i = i**1/c (c >1) Things get more complicated when we have nested loops that are dependent, as we have seen in many occasions throughout the course. 17
18 Worst / Best Case Complexity In many cases, for the same size of input, the content of the input itself affects the complexity. Examples we have seen? Examples in which this is not the case? Note that this statement is completely illogical: "The best time complexity is when n is very small " Often the average complexity is more informative (e.g. when the worst case is rather rare). However analyzing it is usually more complicated, and requires some knowledge on the distribution of inputs. T( I) Assuming distribution is uniform: T ( n) = average I Input( n) Input( n) 18 examples from our course? - hash operation are O(1) on average (not including comparing/hashing elements) - Quicksort runs on average in O(nlogn) (also best case)
19 Recursive Algorithms Divide Conquer Join Solve smaller instances of the problem and join them Tips: 1. First define the recursion step: think about only 1 level of the recursion. Then adjust the appropriate base conditions 2. If subproblems repeat, consider memoization to speedup solution Recursive algorithms seen in our course: Lectures: - Fibonacci, n!, binary search (also seen iterative), Quicksort, Mergesort, Hanoi, 8 queens, Recitations: - Binom, the "change" problem, maximum (several versions), HW: - tree stuff (heavypath, mirror), munch (ahhm, chomp), 19
20 Recursion Trees A useful tool for understanding and analyzing recursion. Recall the Fibonacci recursion tree analysis: O(n/2) O(n) Each node requires O(1) time. = c( n-1 ) = c(2 n -1) = O(2 n ) 20 = c( (n/2)-1 ) = c(2 n/2-1) = O(2 n/2 ) = O( 2 n )
21 Recurrence Relations Another, more compact and formal description of recursive processes is recurrence relations. Recall the formula for Quicksort's best case t(n) = 2t(n/2) + O(n) This allows easy categorization of the recursive "pattern": how many recursive calls? of what size each? how much time beyond recursion (for the divide and join stages) 21
22 Recursive Formulae Summary דוגמא פעולות מעבר לרקורסיה קריאות רקורסיביות נוסחת נסיגה סיבוכיות O(N) T(N)=1+T(N-1) N-1 1,max1 עצרת O(log N) T(N)=1+T(N/2) N/2 חיפוש בינרי 1 O(N 2 ) T(N)=N+ T(N-1) N-1 N Quicksort (worst case) max11 O(N log N) T(N)=N+2T(N/2) N/2,N/2 N Mergesort Quicksort (best case) max22 O(N) T(N)=N+T(N/2) N/2 N חיפוש slicing בינארי עם O(N) T(N)=1+2T(N/2) N/2,N/2 1 max2 O(2 N ) T(N)=1+2T(N-1) N-1, N-1 1 האנוי φ = O(φ N ) T(N)=1+T(N-1)+T(N-2) N-1, N-2 1 פיבונאצ'י 22
23 Randomized Algorithms Apply a random choice at some stage (as opposed to deterministic algorithms). Also termed probabilistic / coin flipping algorithms Randomness in this course? - Probabilistic primality testing (with Fermat's little theorem) - Diffie-Hellman protocol for generating a secret shared key over a public communication network - Quicksort (with random pivot selection) - Karp Rabin - Π approximation What is randomness good for? Running time improvement (e.g. primality testing) Crypto secrecy (e.g. DH) Defense against evil opponent / bad luck (e.g. QS, KR) Sampling (e.g. Π) 23
24 Greedy Algorithms Do what's best now! Do not look at the larger "picture" The simple version of Ziv-Lempel compression that we have learned is greedy. HW7: is this justified in terms of compression efficiency? Huffman tree construction is also greedy. Greediness does not necessarily pay off (computationally speaking) 24 image from Wikipedia
25 "Brute Force" Algorithms Brute force, or exhaustive algorithms, simply "try out" all possible solutions. When the number of possible solutions is exponential, we do our best to avoid such algorithms. A short detour: HW6's puzzle problem 25
26 HW6's puzzle problem Brute force solution: check all m 2! arrangements. a terrible solution for even relatively small m Here is a high level description of a possible solution, assuming the puzzle is unique * : 1. find e.g. top-left corner 2. extend it step by step to complete leftmost column 3. extend each leftish cell to a whole row Not assuming the puzzle is unique, we may consider these approaches: - approach 1: reduce the probability for a wrong stich (but still prob>0, i.e. solution may fail): - By checking more than 1 border before each stich. For example, fill upper row and leftmost column first, then fill up the lines by checking "corners" (see solution sketch in the next slides) - By trying several starting positions - Approach 2: use recursion to examine all possible routes (ensures success) - reminds a bit of the 8 queen problem Can use hash (of borders) for speedup 26 * each piece has a single neighbor from each side, except the borders that lack some of them
27 HW6's puzzle problem Solution Sketch def find_right_nbr(piece, puzzle): '''find a neighbor on the right of piece''' for i in range(m): for j in range(m): if right_nbr(piece, puzzle[i][j]): return i,j return None def right_nbr(piece1, piece2):... def find_down_nbr(piece, puzzle):... def down_nbr(piece1, piece2):... def find_top_left(puzzle): for i in range(m): for j in range(m): if is_top_left(puzzle,i,j) == True: return i,j def is_top_left(puzzle,i,j):... 27
28 HW6's puzzle problem Solution Sketch (2) print("solving puzzle...") result = [[0]*m for i in range(m)] print("locating top left corner...") i,j = find_top_left(puzzle) result[0][0] = puzzle[i][j] print("recreating leftmost column...") for i in range(m-1): current = result[i][0] x,y = find_down_nbr(current, puzzle) result[i+1][0] = puzzle[x][y] print("recreating upper row...")... print("recreating rest of puzzle...") for i in range(1,m): for j in range(1,m): x,y =... result[i][j] = puzzle[x][y] 28
29 Parallel / Distributed Algorithms Parallel if 2 subtasks are independent, solve them at the same time by 2 computers Distributed several computing units interact with each other, but there is no high level "manager". In parallel computing there is a central computing unit that acts as the "manager" of the whole process 29 Dictatorship Democracy
30 הצצה אל העולם האפל של הסיבוכיות החישוביות NPC NP P 30
31 קושי של בעיות נבחין בין מצבי הידע הבאים בנוגע לפתרון לבעיות חישוביות: בעיות טריוויאליות - בעיות שאנו פשוט יודעים את הפתרון שלהן, מצריכות רק שליפה מהזיכרון * דוגמה: כמה זה? בעיות קלות איננו יודעים פתרון, אבל יש לנו דרך יעילה** לחשב פתרון דוגמה: כמה זה 2? דוגמה: כמה פעמים מופיע המילה "and" בעמוד הראשי של הניו-יורק טיימס? דוגמה: מיון רשימה.2 בעיות קשות לא ידועה / לא קיימת דרך פתרון יעילה דוגמה: הדפסת כל המעברים בבעיית מגדלי האנוי עבור n דיסקיות (ידועה רק דרך אקספוננציאלית).3 * מבחינת המחשב, אין באמת בעיות טריוויאלית: כל דבר דורש חישוב. אבל אם הפתרון שמור איפשהו והמחשב רק שולף אותו, נתייחס לזה כאל בעייה טריוויאלית. ** דרך יעילה = אלגוריתם בזמן ריצה פולינומי 31
32 מצבי ידע ולמידה אחת ההגדרות של למידה היא מעבר ממצב ידע אחד למצב ידע גבוה יותר. 7*8 =? בעיות קלות בעיות טריוויאליות בעיות קשות 32
33 בעיה קשה אך קלה לאימות מחלקת הבעיות הקשות מכילה בעיות שלא ידוע חלק מבעיות אלו מקיימות תכונה מעניינת: להם פתרון פולינומי. (verify) אותו. אם נקבל לידנו פתרון חוקי, יש לנו דרך יעילה* לאמת דוגמה שראינו בקורס? בעיית הלוגריתם הדיסקרטי Log).(Discrete.p, g, g a % p מתוך a לא יודעת איך למצוא את Eve אבל אם תנסה את כל האפשרויות ו"תיפול" על a מתאים, היא תוכל לאמת זאת בקלות (כי Modular exponentiation קלה). מעתה המונח בעיות קשות יתייחס לסוג זה של בעיות, ואילו המונח בעיות קשות באמת יתייחס לאלו שידוע שאין להם פתרון פולינומי. כרגיל, * יעיל = בזמן פולינומי 33
34 4 דרגות קושי של בעיות בעיות טריוויאליות אנו יודעים את הפתרון שלהן, מצריכות שליפה מהזיכרון.1 בעיות קלות איננו יודעים פתרון, אבל יש לנו דרך פולינומית לחשב פתרון דוגמה: מיון רשימה בעיות קשות איננו יודעים פתרון או דרך יעילה לחשב פתרון, אבל אם נקבל לידנו פתרון חוקי, יש לנו דרך יעילה לאמת אותו דוגמה: לוג דיסקרטי.2.3 בעיות קשות באמת לחישוב פתרון. קיימות רק דרכים בלתי-יעילות (אקספוננציאליות).4 דוגמה: האנוי 34
35 עוד דוגמה x =? x = 1+2 x 2 + 2x - 7 = 0 x 7 + 2x 4-7x + 4 = 0 בעיה טריוויאלית בעיה קלה בעיה קשה 35
36 התמודדות חישובית עם בעיות בעיות טריוויאליות אינן מעניינות מבחינה חישובית..1 לבעיות קלות יש אלגוריתמים יעילים, ולכן חישובית אינן צריכות להדאיג. אבל אפשר לנסות לשפר את האלגוריתמים / להוכיח חסם תחתון לבעיה המעיד כי לא ניתן לשפר עוד. דרכים להתמודד עם בעיות (a (b (c (d קשות: אלו היו במוקד הקורס שלנו גם אלו נמצאות בלב מדעי המחשב ניסוי וטעייה, או בשם אחר חיפוש ממצה search) :(exhaustive מעבר שיטתי על כל האפשרויות ובדיקתן אחת אחת קירובים (approximations) פתרון "כמעט" נכון בזמן פולינומי הנחת הנחות שונות המצמצמות את הבעיה לתת-משפחות אותן קל יותר לפתור למידה ומחקר בנסיון להפכן לבעיות קלות או אפילו טריוויאליות..2.3 c דרכים a התמודדות עם בעיות קשות באמת: לעיל עד.4 36
37 בעיות הכרעה רוב הבעיות שראינו בקורס עד כה ביקשו לחשב תוצאה כלשהי שהיא מספר, מחרוזת או אובייקט אחר כלשהו: x x חיפוש: רשימה ואיבר המיקום של ברשימה, אם קיים a לוג דיסקרטי: p, g, g a % p... נגביל כעת את הדיון לבעיות הכרעה: בעיות שמבקשות תשובה "כן" / "לא" בלבד לשאלה כלשהי. רוב הבעיות שאינן בעיות הכרעה ניתנות לניסוח כבעיות הכרעה:? x האם x חיפוש: רשימה ואיבר ברשימה? a<k האם k לוג דיסקרטי: p, g, g a %p ובנוסף מספר קיים 37
38 להלן מפה מדינית: דוגמה: צביעת מפות (מתוך האתר "מדעי המחשב ללא מחשב".( נגדיר צביעה חוקית של מפה: צביעה של כל מדינה בצבע אחד, כך שאין שתי מדינות גובלות באותו צבע. שאלות: האם ניתן לצבוע את המפה הזו ב- 2 צבעים? צבעים? צבעים? 2 צבעים 3 צבעים 4 צבעים 5 צבעים יש מפה כן כל מפה לא לא?????? 38
39 צביעת מפות ייצוג והכללה (Graph) מפה ניתנת לייצוג באמצעות גרף אוסף של קדקדים וקשתות. המדינות בין שתי מדינות שכנות מיפוי מצמתים למספרים,1,2,3 צמתים = קשתות = צביעה = ננסח את השאלות מהשקף הקודם באופן כללי, וכשאלת הכרעה: בהינתן גרף ומספר k, האם ניתן לצבוע את הגרף באמצעות k צבעים בלבד? 39
40 צביעת גרף 2 צבעים תנאי להיותו של גרף 2 -צביע (2-colorable) גרף ניתן לצביעה ב- 2 צבעים אם"ם אין בו מעגלים באורך איזוגי. גרף כזה מכונה גם גרף דו-צדדי.(Bipartite) 40
41 - סיבוכיות צביעת גרף ב- 2 צבעים שאלה: מה דרגת הקושי של הבעיה "האם גרף ניתן לצביעה ב- 2 צבעים"?,(n) האלגוריתם עובר על כל צומת ועל כל קשת פעם אחת. אם גודל הקלט הוא מספר הקשתות (m) ומספר הצמתים סיבוכיות של,O(n+m) כלומר ליניארית. ניתן להשיג לכן בדיקה האם גרף הוא 2 -צביע היא בעיה קלה חישובית. 41
42 גרף מישורי לפני שנחשוף עוד תוצאה מפורסמת, נשים לב לתכונה הבאה: גרף שמייצג מפה מישורית ניתן לשרטוט כאשר אף קשת לא חותכת אף קשת אחרת. גרף כזה נקרא graph).(planar גרף מישורי 42
43 4 צבעים בגרף מישורי מתי גרף מישורי הוא 4 -צביע (4-colorable)? תמיד!! משפט ארבעת הצבעים: כל גרף מישורי ניתן לצביעה ב- 4 צבעים. בשנת 1852 צעיר בריטי בשם פרנסיס גאתרי ניסח זאת כהשערה. במשך למעלה מ- 120 שנה טובי המתמטיקאים בעולם ניסו להוכיח את השערת ארבעת הצבעים ללא הצלחה. המשפט הוכח בשנת ההוכחה מראה שניתן לסווג כל דוגמה נגדית אפשרית לאחת מ- אחד מצעדי ההוכחה כולל בחינת סוגים אלו באמצעות מחשב סוגי מפות. ההוכחה שנויה במחלוקת מבחינה פילוסופית. מדוע? מה דעתכם? שאלה: לאיזו קטגוריה שייכת הבעיה "האם גרף מישורי ניתן לצביעה ב- 4 צבעים"? תשובה: זוהי בעיה טריוויאלית. אבל: בעיית מציאת צביעה ב- 4 צבעים לגרף מישורי, אם קיימת, איננה כזו. 43
44 3 צבעים? לא ידוע כיום אלגוריתם יעיל שעונה "כן"/"לא" לשאלה: בהינתן גרף כלשהו, האם ניתן לצבוע אותו ב- 3 צבעים? כלומר הבעיה איננה קלה. האם לדעתכם היא קשה או קשה באמת? במילים אחרות: אם נתון לנו גרף כלשהו, ונתונה צביעה חוקית שלו ב- 3 ניתן לוודא ביעילות שזוהי אכן צביעה חוקית? צבעים האם מסקנה: הבעיה "האם גרף כלשהו ניתן לצביעה ב- 3 צבעים" היא בעיה קשה. למעשה, המסקנה נכונה לכל מספר צבעים 2<k (לא עבור המקרה הפרטי של גרף מישורי, כאמור). 44
45 ? P = NP מחלקת בעיות ההכרעה הקלות מסומנת (Polynomial) P מחלקת בעיות ההכרעה הקשות מסומנת,Non-deterministic polynomial) NP לא נסביר...) NP? מה היחס בין שתי המחלקות הללו? P=NP הסבר ודיון. P השאלה הפתוחה הגדולה של מדעי המחשב (הפרס - מיליון דולר במזומן ותהילת עולם): האם היכולת לזהות ביעילות פתרון חוקי של בעיה מעידה על יכולת לפתור אותה ביעילות? פורמלית: האם?P=NP 45 רוב מדעני המחשב סבורים ש-.P NP אך זה מעולם לא הוכח. יש לכך תימוכין מכיוונים שונים,
46 בדיקת ראשוניות testing) (Primality הבעיה: בהינתן מספר שלם חיובי N, האם הוא ראשוני? עד לא מזמן ידעו לומר שהבעיה ב-.NP ב נתגלה שהבעיה למעשה ב- P. הערה: יש להבדיל בין בדיקת ראשוניות לבין פירוק לגורמים ראשוניים. לבעייה אחרונה לא ידוע אלגוריתם פולינומי כיום. שאלה: האם בעיית הפירוק לגורמים ב-?NP 46
47 המחלקה NPC NP-Complete הוא קיצור של NPC (בעברית: NP -שלם). לא נסביר את השם הזה... זוהי תת מחלקה של NP הכוללת למעלה מ בעיות בעלות התכונה המפתיעה הבאה: 1) אם לאחת מהן יש פתרון פולינומי לכולן יש 2) אם לאחת מהן אין פתרון פולינומי לאף אחת אין ניתן להראות שבמקרה (1,P=NP ואילו במקרה (2 NP P ומכאן העניין הרב שיש במחלקה זו. NPC P=NP=NPC NP? P 47 בעיית צביעה ב- 3 צבעים שייכת ל-.NPC בעיית הלוג הדיסקרטי שייכת ל-,NP ולא ידוע אם היא שייכת גם ל-,NPC או שאולי ל- P.
48 עוד דוגמה: שבעת הגשרים של Königsberg כיום קלינינגרד ברוסיה Königsberg בעיה שנוסחה ע"י לאונרד 1735 ב- אוילר, נחשבת לפרסום הראשון ב"תורת הגרפים" לימים ענף מרכזי במדעי המחשב 48 האם ניתן להתחיל מנקודה מסוימת בעיר, לאותה נקודה? לעבור בכל הגשרים בדיוק פעם אחת, ולחזור
49 מידול והפשטה (abstraction) האם ניתן להתחיל מנקודה מסוימת בעיר, ולחזור לאותה נקודה? מה הפרטים החשובים כאן? לעבור בכל הגשרים בדיוק פעם אחת, האם יש בגרף מסלול שעובר בכל קשת בדיוק פעם אחת? 49
50 מסלול / מעגל אוילר הגדרה: מסלול אוילר בגרף הוא מסלול שעובר בכל קשת בדיוק פעם אחת. אם מסלול אוילר מתחיל ונגמר באותו צומת, הוא ייקרא מעגל אוילר. השאלה שלנו אם כן הפכה להיות: מתי גרף מכיל מסלול / מעגל אוילר? משפט (אוילר, 1736): ** * מכיל "מסלול אוילר" אם כל צמתיו, למעט בדיוק 2, בעלי דרגה גרף קשיר והוא מכיל "מעגל אוילר" אם כל צמתיו בעלי דרגה זוגית. זוגית. 50 גרף קשיר מכל צומת ניתן להגיע לכל צומת * ** דרגה של צומת - כמות הקשתות שנוגעות בצומת
51 House of Santa האם תוכלו לצייר את הבית מבלי להרים את העיפרון? האם יש בגרף מסלול אוילר? הפשטה מאפשרת לראות דמיון בין בעיות! 51
52 מסלולי אוילר / המילטון מסלול אוילר :(Euler) מסלול שעובר בכל קשתות הגרף בדיוק פעם אחת. הבעיה "האם גרף קשיר מכיל מסלול אוילר" ניתנת לפתרון בזמן פולינומי: עוברים על הגרף ובודקים כמה צמתים יש עם דרגה איזוגית. אם יש 0 או 2 עונים "כן", אחרת עונים "לא". P. בעיית מסלול אוילר שייכת למחלקה מסלול המילטון :(Hamilton) מסלול שעובר בכל צמתי הגרף בדיוק פעם אחת. למרות הדמיון בין הבעיות, לא ידוע כיום אלגוריתם פולינומי לבעיה זו. שאלה: האם הבעייה או קשה קשה באמת? 52 שאלה: האם ייתכן שהבעיה בכל זאת ב- P?
53 בעיות קשות עוד יותר? האם יש בעיות קשות יותר מהבעיות ה"קשות באמת"? האם יש בעיות שבכלל לא ניתן לפתור בזמן סופי? בשיעור הבא (והאחרון)... כל הנ"ל יילמד לעומק ובאופן פורמלי הרבה יותר בקורס מודלים חישוביים 53
EE512: Error Control Coding
EE512: Error Control Coding Solution for Assignment on Finite Fields February 16, 2007 1. (a) Addition and Multiplication tables for GF (5) and GF (7) are shown in Tables 1 and 2. + 0 1 2 3 4 0 0 1 2 3
2 Composition. Invertible Mappings
Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Composition. Invertible Mappings In this section we discuss two procedures for creating new mappings from old ones, namely,
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Αν κάπου κάνετε κάποιες υποθέσεις να αναφερθούν στη σχετική ερώτηση. Όλα τα αρχεία που αναφέρονται στα προβλήματα βρίσκονται στον ίδιο φάκελο με το εκτελέσιμο
TMA4115 Matematikk 3
TMA4115 Matematikk 3 Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet Trondheim Spring 2010 Lecture 12: Mathematics Marvellous Matrices Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet
3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β
3.4 SUM AND DIFFERENCE FORMULAS Page Theorem cos(αβ cos α cos β -sin α cos(α-β cos α cos β sin α NOTE: cos(αβ cos α cos β cos(α-β cos α -cos β Proof of cos(α-β cos α cos β sin α Let s use a unit circle
Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)
Phys460.nb 81 ψ n (t) is still the (same) eigenstate of H But for tdependent H. The answer is NO. 5.5.5. Solution for the tdependent Schrodinger s equation If we assume that at time t 0, the electron starts
Instruction Execution Times
1 C Execution Times InThisAppendix... Introduction DL330 Execution Times DL330P Execution Times DL340 Execution Times C-2 Execution Times Introduction Data Registers This appendix contains several tables
Models for Probabilistic Programs with an Adversary
Models for Probabilistic Programs with an Adversary Robert Rand, Steve Zdancewic University of Pennsylvania Probabilistic Programming Semantics 2016 Interactive Proofs 2/47 Interactive Proofs 2/47 Interactive
Section 8.3 Trigonometric Equations
99 Section 8. Trigonometric Equations Objective 1: Solve Equations Involving One Trigonometric Function. In this section and the next, we will exple how to solving equations involving trigonometric functions.
Finite Field Problems: Solutions
Finite Field Problems: Solutions 1. Let f = x 2 +1 Z 11 [x] and let F = Z 11 [x]/(f), a field. Let Solution: F =11 2 = 121, so F = 121 1 = 120. The possible orders are the divisors of 120. Solution: The
Other Test Constructions: Likelihood Ratio & Bayes Tests
Other Test Constructions: Likelihood Ratio & Bayes Tests Side-Note: So far we have seen a few approaches for creating tests such as Neyman-Pearson Lemma ( most powerful tests of H 0 : θ = θ 0 vs H 1 :
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα είναι μικρότεροι το 1000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Διάρκεια: 3,5 ώρες Καλή
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Όλοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι του 10000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Αν κάπου κάνετε κάποιες υποθέσεις
Homework 3 Solutions
Homework 3 Solutions Igor Yanovsky (Math 151A TA) Problem 1: Compute the absolute error and relative error in approximations of p by p. (Use calculator!) a) p π, p 22/7; b) p π, p 3.141. Solution: For
The Simply Typed Lambda Calculus
Type Inference Instead of writing type annotations, can we use an algorithm to infer what the type annotations should be? That depends on the type system. For simple type systems the answer is yes, and
Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in
Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in : tail in X, head in A nowhere-zero Γ-flow is a Γ-circulation such that
SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions
SCHOOL OF MATHEMATICAL SCIENCES GLMA Linear Mathematics 00- Examination Solutions. (a) i. ( + 5i)( i) = (6 + 5) + (5 )i = + i. Real part is, imaginary part is. (b) ii. + 5i i ( + 5i)( + i) = ( i)( + i)
Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3
Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3 1 State vector space and the dual space Space of wavefunctions The space of wavefunctions is the set of all
derivation of the Laplacian from rectangular to spherical coordinates
derivation of the Laplacian from rectangular to spherical coordinates swapnizzle 03-03- :5:43 We begin by recognizing the familiar conversion from rectangular to spherical coordinates (note that φ is used
Lecture 2. Soundness and completeness of propositional logic
Lecture 2 Soundness and completeness of propositional logic February 9, 2004 1 Overview Review of natural deduction. Soundness and completeness. Semantics of propositional formulas. Soundness proof. Completeness
תורת הגרפים - סימונים
תורת הגרפים - סימונים.n = V,m = E בהינתן גרף,G = V,E נסמן: בתוך סימוני ה O,o,Ω,ω,Θ נרשה לעצמנו אף להיפטר מהערך המוחלט.. E V,O V + E כלומר, O V + E נכתוב במקום אם כי בכל מקרה אחר נכתוב או קשת של גרף לא
Concrete Mathematics Exercises from 30 September 2016
Concrete Mathematics Exercises from 30 September 2016 Silvio Capobianco Exercise 1.7 Let H(n) = J(n + 1) J(n). Equation (1.8) tells us that H(2n) = 2, and H(2n+1) = J(2n+2) J(2n+1) = (2J(n+1) 1) (2J(n)+1)
Statistical Inference I Locally most powerful tests
Statistical Inference I Locally most powerful tests Shirsendu Mukherjee Department of Statistics, Asutosh College, Kolkata, India. shirsendu st@yahoo.co.in So far we have treated the testing of one-sided
Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics
Fourier Series MATH 211, Calculus II J. Robert Buchanan Department of Mathematics Spring 2018 Introduction Not all functions can be represented by Taylor series. f (k) (c) A Taylor series f (x) = (x c)
Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.
B-Trees Index files can become quite large for large main files Indices on index files are possible 3 rd -level index 2 nd -level index 1 st -level index Main file 1 The 1 st -level index consists of pairs
Section 7.6 Double and Half Angle Formulas
09 Section 7. Double and Half Angle Fmulas To derive the double-angles fmulas, we will use the sum of two angles fmulas that we developed in the last section. We will let α θ and β θ: cos(θ) cos(θ + θ)
Overview. Transition Semantics. Configurations and the transition relation. Executions and computation
Overview Transition Semantics Configurations and the transition relation Executions and computation Inference rules for small-step structural operational semantics for the simple imperative language Transition
4.6 Autoregressive Moving Average Model ARMA(1,1)
84 CHAPTER 4. STATIONARY TS MODELS 4.6 Autoregressive Moving Average Model ARMA(,) This section is an introduction to a wide class of models ARMA(p,q) which we will consider in more detail later in this
HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:
HOMEWORK 4 Problem a For the fast loading case, we want to derive the relationship between P zz and λ z. We know that the nominal stress is expressed as: P zz = ψ λ z where λ z = λ λ z. Therefore, applying
Approximation of distance between locations on earth given by latitude and longitude
Approximation of distance between locations on earth given by latitude and longitude Jan Behrens 2012-12-31 In this paper we shall provide a method to approximate distances between two points on earth
Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016
Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Dynamic types, Lambda calculus machines Apr 21 22, 2016 1 Dynamic types and contracts (a) To make sure you understand the
פתרון תרגיל מרחבים וקטורים. x = s t ולכן. ur uur נסמן, ur uur לכן U הוא. ur uur. ur uur
פתרון תרגיל --- 5 מרחבים וקטורים דוגמאות למרחבים וקטורים שונים מושגים בסיסיים: תת מרחב צירוף לינארי x+ y+ z = : R ) בכל סעיף בדקו האם הוא תת מרחב של א } = z = {( x y z) R x+ y+ הוא אוסף הפתרונות של המערכת
Partial Differential Equations in Biology The boundary element method. March 26, 2013
The boundary element method March 26, 203 Introduction and notation The problem: u = f in D R d u = ϕ in Γ D u n = g on Γ N, where D = Γ D Γ N, Γ D Γ N = (possibly, Γ D = [Neumann problem] or Γ N = [Dirichlet
Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής
Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής Να γραφεί πρόγραμμα το οποίο δέχεται ως είσοδο μια ακολουθία S από n (n 40) ακέραιους αριθμούς και επιστρέφει ως έξοδο δύο ακολουθίες από θετικούς ακέραιους
Right Rear Door. Let's now finish the door hinge saga with the right rear door
Right Rear Door Let's now finish the door hinge saga with the right rear door You may have been already guessed my steps, so there is not much to describe in detail. Old upper one file:///c /Documents
CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS
CHAPTER 5 SOLVING EQUATIONS BY ITERATIVE METHODS EXERCISE 104 Page 8 1. Find the positive root of the equation x + 3x 5 = 0, correct to 3 significant figures, using the method of bisection. Let f(x) =
ST5224: Advanced Statistical Theory II
ST5224: Advanced Statistical Theory II 2014/2015: Semester II Tutorial 7 1. Let X be a sample from a population P and consider testing hypotheses H 0 : P = P 0 versus H 1 : P = P 1, where P j is a known
the total number of electrons passing through the lamp.
1. A 12 V 36 W lamp is lit to normal brightness using a 12 V car battery of negligible internal resistance. The lamp is switched on for one hour (3600 s). For the time of 1 hour, calculate (i) the energy
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Ψηφιακή Οικονομία Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών Τέλος Ενότητας Χρηματοδότηση Το παρόν εκπαιδευτικό υλικό έχει αναπτυχθεί
Matrices and Determinants
Matrices and Determinants SUBJECTIVE PROBLEMS: Q 1. For what value of k do the following system of equations possess a non-trivial (i.e., not all zero) solution over the set of rationals Q? x + ky + 3z
Assalamu `alaikum wr. wb.
LUMP SUM Assalamu `alaikum wr. wb. LUMP SUM Wassalamu alaikum wr. wb. Assalamu `alaikum wr. wb. LUMP SUM Wassalamu alaikum wr. wb. LUMP SUM Lump sum lump sum lump sum. lump sum fixed price lump sum lump
Fractional Colorings and Zykov Products of graphs
Fractional Colorings and Zykov Products of graphs Who? Nichole Schimanski When? July 27, 2011 Graphs A graph, G, consists of a vertex set, V (G), and an edge set, E(G). V (G) is any finite set E(G) is
PARTIAL NOTES for 6.1 Trigonometric Identities
PARTIAL NOTES for 6.1 Trigonometric Identities tanθ = sinθ cosθ cotθ = cosθ sinθ BASIC IDENTITIES cscθ = 1 sinθ secθ = 1 cosθ cotθ = 1 tanθ PYTHAGOREAN IDENTITIES sin θ + cos θ =1 tan θ +1= sec θ 1 + cot
Section 9.2 Polar Equations and Graphs
180 Section 9. Polar Equations and Graphs In this section, we will be graphing polar equations on a polar grid. In the first few examples, we will write the polar equation in rectangular form to help identify
Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013
Notes on Average Scattering imes and Hall Factors Jesse Maassen and Mar Lundstrom Purdue University November 5, 13 I. Introduction 1 II. Solution of the BE 1 III. Exercises: Woring out average scattering
Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit
Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit Ting Zhang Stanford May 11, 2001 Stanford, 5/11/2001 1 Outline Ordinal Classification Ordinal Addition Ordinal Multiplication Ordinal
9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr
9.9 #. Area inside the oval limaçon r = + cos. To graph, start with = so r =. Compute d = sin. Interesting points are where d vanishes, or at =,,, etc. For these values of we compute r:,,, and the values
The challenges of non-stable predicates
The challenges of non-stable predicates Consider a non-stable predicate Φ encoding, say, a safety property. We want to determine whether Φ holds for our program. The challenges of non-stable predicates
Areas and Lengths in Polar Coordinates
Kiryl Tsishchanka Areas and Lengths in Polar Coordinates In this section we develop the formula for the area of a region whose boundary is given by a polar equation. We need to use the formula for the
פתרון תרגיל 5 מבוא ללוגיקה ותורת הקבוצות, סתיו תשע"ד
פתרון תרגיל 5 מבוא ללוגיקה ותורת הקבוצות, סתיו תשע"ד 1. לכל אחת מן הפונקציות הבאות, קבעו אם היא חח"ע ואם היא על (הקבוצה המתאימה) (א) 3} {1, 2, 3} {1, 2, : f כאשר 1 } 1, 3, 3, 3, { 2, = f לא חח"ע: לדוגמה
Numerical Analysis FMN011
Numerical Analysis FMN011 Carmen Arévalo Lund University carmen@maths.lth.se Lecture 12 Periodic data A function g has period P if g(x + P ) = g(x) Model: Trigonometric polynomial of order M T M (x) =
Abstract Storage Devices
Abstract Storage Devices Robert König Ueli Maurer Stefano Tessaro SOFSEM 2009 January 27, 2009 Outline 1. Motivation: Storage Devices 2. Abstract Storage Devices (ASD s) 3. Reducibility 4. Factoring ASD
Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1
Eon : Fall 8 Suggested Solutions to Problem Set 8 Email questions or omments to Dan Fetter Problem. Let X be a salar with density f(x, θ) (θx + θ) [ x ] with θ. (a) Find the most powerful level α test
ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ
ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ Ενότητα 12: Συνοπτική Παρουσίαση Ανάπτυξης Κώδικα με το Matlab Σαμαράς Νικόλαος Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται σε άδειες χρήσης Creative Commons.
רשימת בעיות בסיבוכיות
ב) ב) רשימת בעיות בסיבוכיות כל בעיה מופיעה במחלקה הגדולה ביותר שידוע בוודאות שהיא נמצאת בה, אלא אם כן מצוין אחרת. כמובן שבעיות ב- L נמצאות גם ב- וב- SACE למשל, אבל אם תכתבו את זה כתשובה במבחן לא תקבלו
Areas and Lengths in Polar Coordinates
Kiryl Tsishchanka Areas and Lengths in Polar Coordinates In this section we develop the formula for the area of a region whose boundary is given by a polar equation. We need to use the formula for the
{ : Halts on every input}
אוטומטים - תרגול 13: רדוקציות, משפט רייס וחזרה למבחן E תכונה תכונה הינה אוסף השפות מעל.(property המקיימות תנאים מסוימים (תכונה במובן של Σ תכונה לא טריביאלית: תכונה היא תכונה לא טריוויאלית אם היא מקיימת:.
C.S. 430 Assignment 6, Sample Solutions
C.S. 430 Assignment 6, Sample Solutions Paul Liu November 15, 2007 Note that these are sample solutions only; in many cases there were many acceptable answers. 1 Reynolds Problem 10.1 1.1 Normal-order
ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ
ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ ΕΛΕΝΑ ΦΛΟΚΑ Επίκουρος Καθηγήτρια Τµήµα Φυσικής, Τοµέας Φυσικής Περιβάλλοντος- Μετεωρολογίας ΓΕΝΙΚΟΙ ΟΡΙΣΜΟΙ Πληθυσµός Σύνολο ατόµων ή αντικειµένων στα οποία αναφέρονται
Elements of Information Theory
Elements of Information Theory Model of Digital Communications System A Logarithmic Measure for Information Mutual Information Units of Information Self-Information News... Example Information Measure
Problem Set 3: Solutions
CMPSCI 69GG Applied Information Theory Fall 006 Problem Set 3: Solutions. [Cover and Thomas 7.] a Define the following notation, C I p xx; Y max X; Y C I p xx; Ỹ max I X; Ỹ We would like to show that C
ΑΛΓΟΡΙΘΜΟΙ Άνοιξη I. ΜΗΛΗΣ
ΑΛΓΟΡΙΘΜΟΙ http://eclass.aueb.gr/courses/inf161/ Άνοιξη 2016 - I. ΜΗΛΗΣ ΔΥΝΑΜΙΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΑΛΓΟΡΙΘΜΟΙ - ΑΝΟΙΞΗ 2016 - Ι. ΜΗΛΗΣ 08 DP I 1 Dynamic Programming Richard Bellman (1953) Etymology (at
Example Sheet 3 Solutions
Example Sheet 3 Solutions. i Regular Sturm-Liouville. ii Singular Sturm-Liouville mixed boundary conditions. iii Not Sturm-Liouville ODE is not in Sturm-Liouville form. iv Regular Sturm-Liouville note
Block Ciphers Modes. Ramki Thurimella
Block Ciphers Modes Ramki Thurimella Only Encryption I.e. messages could be modified Should not assume that nonsensical messages do no harm Always must be combined with authentication 2 Padding Must be
[1] P Q. Fig. 3.1
1 (a) Define resistance....... [1] (b) The smallest conductor within a computer processing chip can be represented as a rectangular block that is one atom high, four atoms wide and twenty atoms long. One
Srednicki Chapter 55
Srednicki Chapter 55 QFT Problems & Solutions A. George August 3, 03 Srednicki 55.. Use equations 55.3-55.0 and A i, A j ] = Π i, Π j ] = 0 (at equal times) to verify equations 55.-55.3. This is our third
About these lecture notes. Simply Typed λ-calculus. Types
About these lecture notes Simply Typed λ-calculus Akim Demaille akim@lrde.epita.fr EPITA École Pour l Informatique et les Techniques Avancées Many of these slides are largely inspired from Andrew D. Ker
Solutions to Exercise Sheet 5
Solutions to Eercise Sheet 5 jacques@ucsd.edu. Let X and Y be random variables with joint pdf f(, y) = 3y( + y) where and y. Determine each of the following probabilities. Solutions. a. P (X ). b. P (X
חורף תש''ע פתרון בחינה סופית מועד א'
מד''ח 4 - חורף תש''ע פתרון בחינה סופית מועד א' ( u) u u u < < שאלה : נתונה המד''ח הבאה: א) ב) ג) לכל אחד מן התנאים המצורפים בדקו האם קיים פתרון יחיד אינסוף פתרונות או אף פתרון אם קיים פתרון אחד או יותר
ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial
ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial Introduction Το Javadoc είναι ένα εργαλείο που παράγει αρχεία html (παρόμοιο με τις σελίδες στη διεύθυνση http://docs.oracle.com/javase/8/docs/api/index.html) από τα σχόλια
Μηχανική Μάθηση Hypothesis Testing
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Μηχανική Μάθηση Hypothesis Testing Γιώργος Μπορμπουδάκης Τμήμα Επιστήμης Υπολογιστών Procedure 1. Form the null (H 0 ) and alternative (H 1 ) hypothesis 2. Consider
( ) 2 and compare to M.
Problems and Solutions for Section 4.2 4.9 through 4.33) 4.9 Calculate the square root of the matrix 3!0 M!0 8 Hint: Let M / 2 a!b ; calculate M / 2!b c ) 2 and compare to M. Solution: Given: 3!0 M!0 8
ES440/ES911: CFD. Chapter 5. Solution of Linear Equation Systems
ES440/ES911: CFD Chapter 5. Solution of Linear Equation Systems Dr Yongmann M. Chung http://www.eng.warwick.ac.uk/staff/ymc/es440.html Y.M.Chung@warwick.ac.uk School of Engineering & Centre for Scientific
ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011
Διάρκεια Διαγωνισμού: 3 ώρες Απαντήστε όλες τις ερωτήσεις Μέγιστο Βάρος (20 Μονάδες) Δίνεται ένα σύνολο από N σφαιρίδια τα οποία δεν έχουν όλα το ίδιο βάρος μεταξύ τους και ένα κουτί που αντέχει μέχρι
Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2)
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2) Ιωάννης Τόλλης Τμήμα Επιστήμης Υπολογιστών NP-Completeness (2) x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 11 13 21
Durbin-Levinson recursive method
Durbin-Levinson recursive method A recursive method for computing ϕ n is useful because it avoids inverting large matrices; when new data are acquired, one can update predictions, instead of starting again
Every set of first-order formulas is equivalent to an independent set
Every set of first-order formulas is equivalent to an independent set May 6, 2008 Abstract A set of first-order formulas, whatever the cardinality of the set of symbols, is equivalent to an independent
Démographie spatiale/spatial Demography
ΠΑΝΕΠΙΣΤΗΜΙΟ ΘΕΣΣΑΛΙΑΣ Démographie spatiale/spatial Demography Session 1: Introduction to spatial demography Basic concepts Michail Agorastakis Department of Planning & Regional Development Άδειες Χρήσης
Advanced Subsidiary Unit 1: Understanding and Written Response
Write your name here Surname Other names Edexcel GE entre Number andidate Number Greek dvanced Subsidiary Unit 1: Understanding and Written Response Thursday 16 May 2013 Morning Time: 2 hours 45 minutes
department listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι
She selects the option. Jenny starts with the al listing. This has employees listed within She drills down through the employee. The inferred ER sttricture relates this to the redcords in the databasee
CRASH COURSE IN PRECALCULUS
CRASH COURSE IN PRECALCULUS Shiah-Sen Wang The graphs are prepared by Chien-Lun Lai Based on : Precalculus: Mathematics for Calculus by J. Stuwart, L. Redin & S. Watson, 6th edition, 01, Brooks/Cole Chapter
Solutions to the Schrodinger equation atomic orbitals. Ψ 1 s Ψ 2 s Ψ 2 px Ψ 2 py Ψ 2 pz
Solutions to the Schrodinger equation atomic orbitals Ψ 1 s Ψ 2 s Ψ 2 px Ψ 2 py Ψ 2 pz ybridization Valence Bond Approach to bonding sp 3 (Ψ 2 s + Ψ 2 px + Ψ 2 py + Ψ 2 pz) sp 2 (Ψ 2 s + Ψ 2 px + Ψ 2 py)
Math221: HW# 1 solutions
Math: HW# solutions Andy Royston October, 5 7.5.7, 3 rd Ed. We have a n = b n = a = fxdx = xdx =, x cos nxdx = x sin nx n sin nxdx n = cos nx n = n n, x sin nxdx = x cos nx n + cos nxdx n cos n = + sin
ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω
0 1 2 3 4 5 6 ω ω + 1 ω + 2 ω + 3 ω + 4 ω2 ω2 + 1 ω2 + 2 ω2 + 3 ω3 ω3 + 1 ω3 + 2 ω4 ω4 + 1 ω5 ω 2 ω 2 + 1 ω 2 + 2 ω 2 + ω ω 2 + ω + 1 ω 2 + ω2 ω 2 2 ω 2 2 + 1 ω 2 2 + ω ω 2 3 ω 3 ω 3 + 1 ω 3 + ω ω 3 +
F-TF Sum and Difference angle
F-TF Sum and Difference angle formulas Alignments to Content Standards: F-TF.C.9 Task In this task, you will show how all of the sum and difference angle formulas can be derived from a single formula when
forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with
Week 03: C lassification of S econd- Order L inear Equations In last week s lectures we have illustrated how to obtain the general solutions of first order PDEs using the method of characteristics. We
Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1
Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1 A Brief History of Sampling Research 1915 - Edmund Taylor Whittaker (1873-1956) devised a
Homework 8 Model Solution Section
MATH 004 Homework Solution Homework 8 Model Solution Section 14.5 14.6. 14.5. Use the Chain Rule to find dz where z cosx + 4y), x 5t 4, y 1 t. dz dx + dy y sinx + 4y)0t + 4) sinx + 4y) 1t ) 0t + 4t ) sinx
Bounding Nonsplitting Enumeration Degrees
Bounding Nonsplitting Enumeration Degrees Thomas F. Kent Andrea Sorbi Università degli Studi di Siena Italia July 18, 2007 Goal: Introduce a form of Σ 0 2-permitting for the enumeration degrees. Till now,
Συστήματα Διαχείρισης Βάσεων Δεδομένων
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Συστήματα Διαχείρισης Βάσεων Δεδομένων Φροντιστήριο 9: Transactions - part 1 Δημήτρης Πλεξουσάκης Τμήμα Επιστήμης Υπολογιστών Tutorial on Undo, Redo and Undo/Redo
b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!
MTH U341 urface Integrals, tokes theorem, the divergence theorem To be turned in Wed., Dec. 1. 1. Let be the sphere of radius a, x 2 + y 2 + z 2 a 2. a. Use spherical coordinates (with ρ a) to parametrize.
Code Breaker. TEACHER s NOTES
TEACHER s NOTES Time: 50 minutes Learning Outcomes: To relate the genetic code to the assembly of proteins To summarize factors that lead to different types of mutations To distinguish among positive,
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006
ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/26 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι το 1 εκτός αν ορίζεται διαφορετικά στη διατύπωση
Πανεπιστήμιο Πειραιώς Τμήμα Πληροφορικής Πρόγραμμα Μεταπτυχιακών Σπουδών «Πληροφορική»
Πανεπιστήμιο Πειραιώς Τμήμα Πληροφορικής Πρόγραμμα Μεταπτυχιακών Σπουδών «Πληροφορική» Μεταπτυχιακή Διατριβή Τίτλος Διατριβής Επίκαιρα Θέματα Ηλεκτρονικής Διακυβέρνησης Ονοματεπώνυμο Φοιτητή Σταμάτιος
ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?
Teko Classes IITJEE/AIEEE Maths by SUHAAG SIR, Bhopal, Ph (0755) 3 00 000 www.tekoclasses.com ANSWERSHEET (TOPIC DIFFERENTIAL CALCULUS) COLLECTION # Question Type A.Single Correct Type Q. (A) Sol least
UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:
UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS 150 Fall 2001 Prof. Subramanian Midterm II 1) You are implementing an 4:1 Multiplexer that has the following specifications:
[ ] Observability, Controllability תרגול 6. ( t) t t קונטרולבילית H למימדים!!) והאובז' דוגמא: x. נשתמש בעובדה ש ) SS rank( S) = rank( עבור מטריצה m
Observabiliy, Conrollabiliy תרגול 6 אובזרווביליות אם בכל רגע ניתן לשחזר את ( (ומכאן גם את המצב לאורך זמן, מתוך ידיעת הכניסה והיציאה עד לרגע, וזה עבור כל צמד כניסה יציאה, אז המערכת אובזרוובילית. קונטרולביליות
מתמטיקה בדידה תרגול מס' 13
מתמטיקה בדידה תרגול מס' 13 נושאי התרגול: תורת הגרפים. 1 מושגים בסיסיים נדון בגרפים מכוונים. הגדרה 1.1 גרף מכוון הוא זוג סדור E G =,V כך ש V ו E. V הגרף נקרא פשוט אם E יחס אי רפלקסיבי. כלומר, גם ללא לולאות.
CHAPTER 12: PERIMETER, AREA, CIRCUMFERENCE, AND 12.1 INTRODUCTION TO GEOMETRIC 12.2 PERIMETER: SQUARES, RECTANGLES,
CHAPTER : PERIMETER, AREA, CIRCUMFERENCE, AND SIGNED FRACTIONS. INTRODUCTION TO GEOMETRIC MEASUREMENTS p. -3. PERIMETER: SQUARES, RECTANGLES, TRIANGLES p. 4-5.3 AREA: SQUARES, RECTANGLES, TRIANGLES p.
Notes on the Open Economy
Notes on the Open Econom Ben J. Heijdra Universit of Groningen April 24 Introduction In this note we stud the two-countr model of Table.4 in more detail. restated here for convenience. The model is Table.4.