BBM Discrete Structures: Midterm 2 Date: , Time: 16:00-17:30. Question: Total Points: Score:

Benzer belgeler
BBM Discrete Structures: Final Exam Date: , Time: 15:00-17:00

BBM Discrete Structures: Final Exam - ANSWERS Date: , Time: 15:00-17:00

WEEK 11 CME323 NUMERIC ANALYSIS. Lect. Yasin ORTAKCI.

Yarışma Sınavı A ) 60 B ) 80 C ) 90 D ) 110 E ) 120. A ) 4(x + 2) B ) 2(x + 4) C ) 2 + ( x + 4) D ) 2 x + 4 E ) x + 4

Unlike analytical solutions, numerical methods have an error range. In addition to this

Do not open the exam until you are told that you may begin.

WEEK 4 BLM323 NUMERIC ANALYSIS. Okt. Yasin ORTAKCI.

4. HAFTA BLM323 SAYISAL ANALİZ. Okt. Yasin ORTAKCI.

12. HAFTA BLM323 SAYISAL ANALİZ. Okt. Yasin ORTAKCI.

CHAPTER 7: DISTRIBUTION OF SAMPLE STATISTICS. Sampling from a Population

Do not open the exam until you are told that you may begin.

Matematik Mühendisliği - Mesleki İngilizce

Help Turkish -> English

FINITE AUTOMATA. Mart 2006 Ankara Üniversitesi Bilgisayar Mühendisliği 1

1 I S L U Y G U L A M A L I İ K T İ S A T _ U Y G U L A M A ( 5 ) _ 3 0 K a s ı m

IDENTITY MANAGEMENT FOR EXTERNAL USERS

ATILIM UNIVERSITY Department of Computer Engineering

Yüz Tanımaya Dayalı Uygulamalar. (Özet)

A Y I K BOYA SOBA SOBA =? RORO MAYO MAS A A YÖS / TÖBT

Bu durumda ya cozum yoktur veya sonsuz cozum vardir. KIsaca cozum tek degildir. Veya cozumler birbirine lineer bagimlidir.

a, ı ı o, u u e, i i ö, ü ü

CmpE 320 Spring 2008 Project #2 Evaluation Criteria

CSE225 DATA STRUCTURES 2006 Student Name: MIDTERM EXAM II M.B.T. Student Number:

Properties of Regular Languages. Mart 2006 Ankara Üniversitesi Bilgisayar Mühendisliği - TY 1

g Na2HPO4.12H2O alınır, 500mL lik balonjojede hacim tamamlanır.

IKT 415 OYUN KURAMI ARA SINAV

Context-Free Grammars and Languages

14.12 Oyun Teorisi. 2. oyuncunun sağdaki oyundaki kazançları soldaki oyundaki kazançlarının,

D-Link DSL 500G için ayarları

Algoritmalara Giriş 6.046J/18.401J DERS 2

EXAM CONTENT SINAV İÇERİĞİ

Spectrum of PCM signal depends on Bit rate: Correlation of PCM data PCM waveform (pulse shape) Line encoding. For no aliasing:

"Şirket" Sunucusu ve Başarı Mobile Arasındaki HTTP Veri Aktarımı için Etkileşim Teknik Protokolü

Yaz okulunda (2014 3) açılacak olan (Calculus of Fun. of Sev. Var.) dersine kayıtlar aşağıdaki kurallara göre yapılacaktır:

Argumentative Essay Nasıl Yazılır?

YEDİTEPE ÜNİVERSİTESİ MÜHENDİSLİK VE MİMARLIK FAKÜLTESİ

Eco 338 Economic Policy Week 4 Fiscal Policy- I. Prof. Dr. Murat Yulek Istanbul Ticaret University

Virtualmin'e Yeni Web Sitesi Host Etmek - Domain Eklemek

THE IMPACT OF AUTONOMOUS LEARNING ON GRADUATE STUDENTS PROFICIENCY LEVEL IN FOREIGN LANGUAGE LEARNING ABSTRACT

İŞLETMELERDE KURUMSAL İMAJ VE OLUŞUMUNDAKİ ANA ETKENLER

Grade 8 / SBS PRACTICE TEST Test Number 9 SBS PRACTICE TEST 9

Hukuk ve Hukukçular için İngilizce/ English for Law and Lawyers

Özet. Kümelerle İlgili Tanımlar Kümelerin Gösterimi

It is symmetrical around the mean The random variable has an in nite theoretical range: 1 to +1

Bağlaç 88 adet P. Phrase 6 adet Toplam 94 adet

SINAV İÇERİĞİ EXAM CONTENT

NEY METODU SAYFA 082 NEY METHOD PAGE 082. well.

AİLE İRŞAT VE REHBERLİK BÜROLARINDA YAPILAN DİNİ DANIŞMANLIK - ÇORUM ÖRNEĞİ -

YEDİTEPE ÜNİVERSİTESİ MÜHENDİSLİK VE MİMARLIK FAKÜLTESİ

First Stage of an Automated Content-Based Citation Analysis Study: Detection of Citation Sentences

ise, genel bir eğilim (trend) gösteriyorsa bu seriye uygun doğru ya da eğriyi bulmaya çalışırız. Trend orta-uzun dönemde her iniş, çokışı

Week 5 Examples and Analysis of Algorithms

NATURAL LANGUAGE PROCESSING

LEARNING GOALS Human Rights Lessons

Fıstıkçı Şahap d t c ç

İki Rastgele Değişken

KALEIDOSCOPES N.1. Solo Piano. Mehmet Okonşar

Tanrının Varlığının Ontolojik Kanıtı a

Neyzen olabilmek için en önemli özellik; sabretmeyi bilmektir. In order to be a neyzen the most important thing is to be patient.

Jeokimya Analizleri. Geochemical Analysis

L2 L= nh. L4 L= nh. C2 C= pf. Term Term1 Num=1 Z=50 Ohm. Term2 Num=2 Z=50 Oh. C3 C= pf S-PARAMETERS

UBE Machine Learning. Kaya Oguz

Present continous tense

Imagine that there are 6 red, 3 green and 2 blue balls in a bag. What is the probability of not drawing a blue ball if you draw 4 ball in a row

#include <stdio.h> int main(void) { float sayi; float * p; p = &sayi; printf("deger girin:"); scanf("%f", p); printf("girilen deger:%f\n", *p);

Questions for Turkish Experts re: Barış Pehlivan s Odatv Computer

Is the P/E cycle of MLC really only 3,000 times as its datasheet said?

SCHOOL OF FOREIGN LANGUAGES NEVSEHIR HACI BEKTAS VELI UNIVERSITY ERASMUS EXAM THIRD SECTION

DOKUZ EYLUL UNIVERSITY FACULTY OF ENGINEERING OFFICE OF THE DEAN COURSE / MODULE / BLOCK DETAILS ACADEMIC YEAR / SEMESTER

İngilizce de selamlaşma maksatlı kullanılabilecek pek çok yapı vardır. Bunlar Türkçeleri ile beraber aşağıda verilmektedir:

Seri kablo bağlantısında Windows95/98/ME'ten Windows 2000'e bağlantı Windows95/98/ME - NT4 bağlantısına çok benzer.

Start Streamin. now! MiniPod Bluetooth Streamin speakers

HAZIRLAYANLAR: K. ALBAYRAK, E. CİĞEROĞLU, M. İ. GÖKLER

How many sides has the polygon?

empati adam fawer 94CA80D2E9C0D7A06FE68F357BDFD9E4 Empati Adam Fawer

AB surecinde Turkiyede Ozel Guvenlik Hizmetleri Yapisi ve Uyum Sorunlari (Turkish Edition)

My Year Manager is Sınıf Müdürüm. P.E. is on Beden eğitimi dersimin günü

Multiplication/division

İNGİLİZCE GRAMER SIMPLE PAST TENSE TO BE (OLMAK FİİLİNİN GEÇMİŞ ZAMANI) GRAMER ANLATIMI ALIŞTIRMA. SIMPLE PAST (to be)

Metropol Yayınları YÖS 2009 Metropol Publications

Bölüm 2 Matematik Dili

MATEMATİK BÖLÜMÜ BÖLÜM KODU:3201

EGE UNIVERSITY ELECTRICAL AND ELECTRONICS ENGINEERING COMMUNICATION SYSTEM LABORATORY

Mantik (Dergah Yayinlari) (Turkish Edition)


Bölüm 2 Matematik Dili. Kümeler

SBS PRACTICE TEST 2. Grade 8 / SBS PRACTICE TEST Test Number 2* 1. Verilen cümlede boşluğa gelecek sözcüğü seçeneklerden işaretleyiniz.

FIHI MA-FIH - NE VARSA ONUN ICINDE VAR BY MEVLANA CELALEDDIN RUMI

a, ı ı o, u u e, i i ö, ü ü şu that (something relatively nearby) şu ekmek o that (something further away) o dondurma

Cases in the Turkish Language

We test validity of a claim or a conjecture (hypothesis) about a population parameter by using a sample data

GAZİ İLKÖĞRETİM OKULU EĞİTİM-ÖĞRETİM YILI YETİŞTİRME KURSU İNGİLİZCE DERSİ 6. SINIF KURSU YILLIK PLANI

5İ Ortak Dersler. İNGİLİZCE II Okutman Aydan ERMİŞ

Delta Pulse 3 Montaj ve Çalıstırma Kılavuzu.

Ardunio ve Bluetooth ile RC araba kontrolü

IKT 415 Exercise 1. Strategic Form (Normal form) Games. 1. Read Osborne (An Introduction to Game Theory) Chapters 1,2,3 and 4.

Final Sınavı Örnek Soruları Bahar 2018

just like all, but unique!

00322 ELECTRICAL MACHINES-II Midterm Exam

Üretilen her bir kar mobile için $20 ücret konur: bu değişken maliyettir, batık maliyet değil.

Transkript:

BBM 205 - Discrete Structures: Midterm 2 Date: 8.12.2016, Time: 16:00-17:30 Ad Soyad / Name: Ögrenci No /Student ID: Question: 1 2 3 4 5 6 7 Total Points: 12 22 10 10 15 16 15 100 Score: 1. (12 points) Prove the inequality, which states if x and y are real numbers, then x + y x + y. (Her x ve y reel sayısı için x + y x + y eşitsizliğinin doğru olduğunu ispatlayın.) Solution: Proof by case analysis using cases: Case 1: x, y 0 Case 2: x, y < 0 Case 3: x 0, y < 0 (or vice versa. Since the inequality is symmetric with respect to x and y, no need to prove the case y 0, x < 0.) Case 1: x + y = x + y, x + y = x + y, true. Case 2: x + y = x y, x + y = (x + y), true. Case 3: x + y = x y. Since we do not know if x + y is negative or not, we consider two subcases: Case 3.1: If x + y < 0, then x + y = (x + y) and we check if x y (x + y). It is true, since x 0. Case 3.2: If x + y 0, then x + y = x + y and we check if x y x + y. It is true, since y < 0.

2. (a) (10 points) Use a proof by contradiction to prove that the product of an irrational number and a rational number is irrational. (Çelişki ile ispat kullanarak irrasyonel ve rasyonel bir sayının çarpımının irrasyonel bir sayı olduğunu gösterin.) Solution: Let x be a rational and y be an irrational number. Assume that their product xy is a rational number. Let x = a/b and xy = c/d for some integers a, b, c, d. Then, we have y = (cb)/(ad), a contradiction. Thus, xy must be an irrational number. (b) (12 points) Use induction to show that 2 n n 3 for n 10. (Tümevarım kullanarak, her n 10 için 2 n n 3 in doğru olduğunu gösterin.) Solution: Base step: The statement is true for n = 10, since 2 10 10 3. Inductive hypothesis: Assume that 2 i i 3 for any i n. Inductive step: 2 n+1 2 n + 2 n 2n 3 n 3 + (3n 2 + 3n + 1). Note that, the last inequality holds because n 10 and n 3 10n 2 3n 2 + 70n 3n 2 + 3n + 1. Page 2

3. (10 points) Let S n denote the number of n-bit strings that do not contain the pattern 00. Find a recurrence relation and initial conditions for the sequence {S n }. (S n içinde 00 altdizisini içermeyen n bitlik dizilerin sayısı olsun. {S n } dizisi için bir rekürsif ilişki ve başlangıç koşulları bulun.) Solution: Let A n be the set of n-bit strings that do not contain the pattern 00. We group the elements of A n into two disjoint subsets B n and C n such that B n C n = and B n C n = A n. Let B n be the bit strings in A n that end with 0 and let C n be the bit strings in A n that end with 1. It is trivial that C n = S n 1, since the first n 1 bits in strings of C n do not contain the pattern 00. For any string in B n, the last two bits are 10. So, B n = S n 2, since the first n 2 bits in strings of B n do not contain the pattern 00. Since A n = B n + C n, we obtain S n = S n 1 + S n 2. 4. (10 points) Use the definition of f(x) is O(g(x)) to show that (x 3 + 2x)/(2x + 1) is O(x 2 ). ( f(x) in O(g(x)) olması tanımını kullanarak (x 3 + 2x)/(2x + 1) in O(x 2 ) olduğunu gösterin.) Solution: We try to find the appropriate constants C and k so that (x 3 + 2x)/(2x + 1) Cx 2 for all x k. First, note that x > 0 for our calculations and by dividing each side of the fraction by x, we have x 3 + 2x 2x + 1 = x2 + 2 2 + (1/x) x2 + 2. For x 1, x 2 + 2 is always at most 3x 2. Hence, C = 3 and k = 1. (You could also say, for x 2, x 2 + 2 2x 2 finding C = 2 and k = 2. The constants C and k are not unique.) Page 3

5. Give as good a big-o estimate as possible for each of these functions. A good estimate means, for example, if you know a function is both O(n 3 ) and O(n 2 ), then O(n 2 ) is a better estimate than O(n 3 ). (Asağıdaki fonksiyonlar için olabileceğinin en iyisi büyük-o tahmininde bulunun. En iyi tahmin ile anlatılmak istenen, örneğin bir fonksiyon hem O(n 3 ) hem O(n 2 ) ise, o zaman O(n 2 ) nin daha iyi bir tahmin olmasıdır.) Solution: (a) (3 points) (n 2 + 8)(n + 1) = O(n 3 ) (b) (3 points) (n log n + n 2 )(n 3 + 2) = O(n 5 ) (c) (3 points) (n! + 2 n )(n 3 + log(n 2 + 1)) = O(n 3 n!) (d) (3 points) (n 3 + n 2 log n)(log n + 1) + (17 log n + 19)(n 3 + 2) = O(n 3 log n) (e) (3 points) (n n + n2 n + 5 n )(n! + 5 n ) = O(n n n!) Page 4

6. Solve the recurrence relations with the given initial conditions. (Asağıda başlangıç koşulları ile verilmiş rekürsif ilişkiler için çözüm bulun.) (a) (8 points) a n = (n 1)a n 2, a 0 = 1, a 1 = 3. Solution: The answer depends whether n is even or odd. method, we obtain the following result. By telescoping n,odd: a n = (n 1)a n 2 = (n 1)(n 3)a n 4 = n,even: = (n 1)(n 3)... 2 a 1 = 3(n 1)(n 3)... 2. a n = (n 1)a n 2 = (n 1)(n 3)a n 4 = (b) (8 points) a n = 6a n 1 9a n 2, a 0 = 1, a 1 = 0. = (n 1)(n 3)... 1 a 0 = (n 1)(n 3)... 1. Solution: We have a n 6a n 1 + 9a n 2 = 0. This is a linear homogeneous recurrence relation and we assume that the solution is a n = r n. This gives r n 6r n 1 + 9r n 2 = 0. Since r 0, we get r 2 6r + 9 = 0 with roots r 1 = r 2 = 3. This implies a n is of the form a n = A3 n + Bn3 n with constants A and B. To find the value of A and B, we use initial conditions as a 0 = 1 = A and a 1 = 0 = 3A + 3B. This gives A = 1 and B = 1 and a n = 3 n n3 n. 7. (a) (3 points) What is the probability of the event that in a randomly chosen permutation {1, 2,..., n}, where n 4, 1 precedes 2 and 2 precedes 4? ({1, 2,..., n} sayılarının rastgele seçilmiş bir permütasyonunda, n 4 için, 1 in 2 den önce (yanyana olması şart değil) ve 2 nin 4 den önce (yanyana olması şart değil) gelme durumunun olasılığı nedir?) Solution: There are 3! different ways to order the numbers 1, 2 and 4 once their positions are fixed. Therefore, the event, where 1 precedes 2 and 2 precedes 4, has probability 1 3! = 1/6. (b) (3 points) What is the probability of the event that in a randomly chosen permutation {1, 2,..., n}, where n 4, 1 immediately precedes 4? ({1, 2,..., n} sayılarının rastgele seçilmiş bir permütasyonunda, n 4 için, 1 in 4 den hemen önce (yanyana) gelme olasılığı nedir?) Page 5

Solution: Let E be the event that contains the outcomes as chosen permutations of {1, 2,..., n}, where 1 immediately precedes 4. Then, E = (n 1)! and Ω = n!. Therefore, p(e) = (n 1)!/n! = 1/n. (c) (3 points) Suppose that E and F are events in a sample space and that p(e) = 1/4, p(f ) = 3/7 and p(e F ) = 1/3. What is p(f E)? (Diyelim ki E ve F bir örnek uzaydaki bağımsız olaylar olsun ve p(e) = 1/4, p(f ) = 3/7, p(e F ) = 1/3. O zaman p(f E) nedir?) Solution: Since p(e F ) = p(e F )/p(f ), we have p(e F ) = p(e F ) p(f ) = (1/3) (3/7) = 1/7. Thus, p(f E) = p(e F )/p(e) = (1/7)/(1/4) = 4/7. (d) (3 points) What is the conditional probability that at least two heads appear when a fair coin is flipped six times, given that the first flip came tails? (Adil bir demir para altı kere atıldığında, ilk atışın yazı geldiği biliniyorsa, en az iki tura gelmesi olasılığı nedir?) Solution: Let E be the event that the first flip came tails and F be the event that at least two heads appear. Since E = 2 5 = 32 and E F = ( ( 5 2) + 5 ( 3) + 5 ) ( 4 + 5 ) 5 = 10 + 10 + 5 + 1 = 26, we have p[f E] = p[e F ] p[e] = E F / Ω E / Ω = E F E = 26 32. (e) (3 points) What is the probability that Alice, Bob and Karen win the first, second and third prize, respectively, in a contest if there are 45 contestants and no one can win more than one prize? (45 kişinin katıldığı ve her yarışmacının en fazla bir ödül alabileceği bir yarışmada katılanlardan Alice in birincilik, Bob ın ikincilik ve Karen in üçüncülük ödülü alması olasılığı nedir?) Solution: 1 P (45,3) = 1 45 44 43 Page 6