Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Final Exam Solutions for First Year Interest Group Seminar | N 1, Exams of Health sciences

Material Type: Exam; Class: FIRST-YEAR INTEREST GROUP SMNR; Subject: Nursing; University: University of Texas - Austin; Term: Unknown 1989;

Typology: Exams

Pre 2010

Uploaded on 08/30/2009

koofers-user-1l0
koofers-user-1l0 🇺🇸

10 documents

1 / 10

Toggle sidebar

Related documents


Partial preview of the text

Download Final Exam Solutions for First Year Interest Group Seminar | N 1 and more Exams Health sciences in PDF only on Docsity! Final Examination Solutions CS 336 1 10 2 10 3 20 4 15 5 10 6 10 7 10 8 20 9 10 10 15 11 10 12 10 Total 150 1. The important issue is the logic you used to arrive at your answer. 2. Use extra paper to determine your solutions then neatly transcribe them onto these sheets. 3. Do not submit the scratch sheets. However, all of the logic necessary to ob- tain the solution should be on these sheets. 4. Comment on all logical flaws and omissions and enclose the comments in boxes 1. [10] For , how many subsets of size 7 from { are there that either contain both and a or both and a (or all four)? 7≥n 1a },,, 21 naaa … 2 3a 4 There are  subsets of size 7 from { that contain both and since there are only 5 elements to choose from the remaining Similarly there are  subsets of size 7 that contain both and a . There are subsets that contain all four, therefore there are 2 subsets that either contain both a and or both and (or all four)      − 5 2n      − 5 2n },,, 21 naaa … 3a 3a 4a 1a    2a   n .2−n    − −   3 n 4 − 5 2   − 3 4    4n 1 2a 2. [10] Given , in how many ways can identical balls be placed into 1≥≥ rn n r distinct bins such that each bin contains at least one ball? (Hint: Consider dot diagrams.) Consider arrays of the form: 1 2 3 … r with n dots interspersed in such a manner that at least one dot follows each number and no dot precedes 1. The number dots correspond to the number of balls in each bin. Since one dot must follow each number in the array, it must look like 1 • • 2• 3• … r• The leading symbol pair “1• ” is fixed. There remain 1−r symbol pairs (number followed by dot) and rn dots to be distributed in the − 1)()1 −=−( +− nrnr positions. Thus, there are positions for the dots.       − − =   − − 1 11 r n r    n n 3. a. [10] Using a combinatorial argument, prove that for and : 2≥n 2≥m       +      +⋅=      + 222 mn mn mn Consider subsets of two elements from the union of disjoint subsets A and B with cardinalities and , respectively. Since n m mnBA +=∪ )(# , there are subsets of size two. Alternatively, consider that either one element comes from each of and       + 2 mn A B , both from , or both from A B . These can be done in , and ways, respectively, and the total is . We conclude that       ⋅ 2 , n mn    2 m + 2    m    +      2 m    +⋅ 2 n mn          + 22 mn m +   ⋅n=     n b. [10] Using a combinatorial argument, prove that for : n ≥ 1 1 1 2 − = =     ∑ n n k n k n k (Hint: Let A be a set of cardinality n. Consider pairs <B, a> where and a .) AB ⊆ BA ~∈ Employing the notation from the hint, and considering the left side of the equa- tion first, there are choices for and then 2 subsets from the remaining elements. Alternatively, let be the number of elements in { . The value of could range from 1 through . For a fixed value of , there are ways to choose{ , and then choices from this for (with the remaining chosen elements forming n ∪ a k k 1−n 1−n Ba ∪} k n k       k n Ba} a B ). There are total ways of doing this and this must equal n . ∑ = n k    k n   k 1 1−n2 8. a. [10] .Recalling that bxx aba logloglog ⋅= )(log nbΟ= , prove that for all a , if then . 1, >b )(log nf aΟ= f Since , there exist )(log nf aΟ= M and so that if n , | . But then, if , N | M N≥ | log||) nM a≤ |log||) nM a (| nf (| nf N≥ nb n log|| log|log| nbM ba ′==≤ , for |log| bM a=M ′ . b. [10]. Consider the following assertion: For all , if then . 1, >ba )( naf Ο= )( nbf Ο= Using a simple example, prove that this assertion is false. Notice your example function must be but not . )( naΟ )( nbΟ Let and b . Clearly is Ο , since for , . But if , then there would have to exist 4=a 4|)(n = 2= |4|1 n⋅ nnf 4)( = )2( nf Ο= )4( n 0≥n | nf ≤ M and so that if , | . Let N n N≥ nnf |)( n M 24 ⋅≤= }1||,max{ +log2= MNn . We have and also , so Nn ≥ Mn log|> M 22 log|≥ M n > )4( n 2 . We conclude that . We conclude that is Ο but is not . |2| nM ⋅=2M ⋅>22 nn ⋅4|)(n = )2n | nf = (Ο n f 9. [10] Prove the following code is partially correct with respect to precondition “ ” and postcondition “ ”: 1≥n },,,max{ 21 naaam …= m :=a[1] i := 2 while i≤n do if m<a[i] then m := a[i] endif i := i+1 endwhile You may assume that m, i, n, and the array a are integer variables. You may also assume that the array components are defined. Finally you may use the following axioms: naaa …,, 21 },, 11 − },,max{},,max{max{ 111 −=⇒ia…≤ iii aaaaaa …… ) iiii aaaaaa =⇒> − },,max{},,max{ 111 …… _________________________ 1≥n m :=a[1] _________________________ 11 ≥∧= nam i := 2 _________________________ 12 1 ≥∧=∧= nami _________________________ },,max{1 11 −=∧+≤ iaamn …i while i≤n do ___________________ },,max{1 11 −=∧+≤∧≤ iaamnin …i if m<a[i] then _____________ },,max{ 11 −=∧≤∧< ii aamniam … _____________ niaaa ii ≤∧<− },, 11 …max{ _____________ niaaa ii ≤∧=},,max{ 1 … m := a[i] _____________ niaaaam iii ≤∧=∧= },,max{ 1 … _____________m niaa i ≤∧= },,max{ 1 … endif __________________ ∨≤∧= )},,max{( 1 niaam i… ( }),,max{ 11 −=∧≤∧> i mniam iaa … __________________ ∨≤∧= )},,max{( 1 niaam i… ,max{ 1am ( )}, niai ≤∧= … __________________ niaam i ≤∧= },,max{ 1 … i := i+1 __________________ i niaami i ≤′∧=∧+′= ′},,max{1 1 … __________________ 1},,max{ 11 +≤∧= − niaa i…m endwhile ________________________ },,max{1 11 −=∧+≤∧> iaamnin …i ________________________ },,max{1 11 −=∧+= iaamn …i ________________________m },,max{ 1 naa …=
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved