Chapter 6 Solved Problems

Total Page:16

File Type:pdf, Size:1020Kb

Chapter 6 Solved Problems Chapter 6 Solved Problems 1. Evaluate the following expressions without using MATLAB. Check the answers with MATLAB. (a)(b) (c)(d) Solution >> % Part (a) >> 6*4>32-3 ans = 0 >> % Part (b) >> y=4*3-7<15/3>-1 y = 1 >> % Part (c) >> y=2*(3<8/4+2)^2<(-2) y = 0 >> % Part (d) >> (5+~0)/3==3-~(10/5-2) ans = 1 >> 1 2 Chapter 6: Solved Problems 2. Given: , , . Evaluate the following expressions without using MATLAB. Check the answers with MATLAB. (a)(b) (c)(d) Solution >> d=6 d = 6 >> e=4 e = 4 >> f=-2 f = -2 >> % Part (a) >> y=d+f>=e>d-e y = 0 >> % Part (b) >> y=e>d>f y = 1 >> % Part (c) >> y=e-d<=d-e==f/f y = 1 >> % Part (d) >> y=(d/e*f<f)>-1*(e-d)/f y = 1 >> Chapter 6: Solved Problems 3 3. Given: v = [–2 4 1 0 2 1 2 ] and w = [2 5 0 1 2 –1 3 ]. Evaluate the follow- ing expressions without using MATLAB. Check the answers with MAT- LAB. (a)~v ==~w (b) w > = v (c) v > ~ –1*w (d) v > –1*w Solution >> v=[-2 4 1 0 2 1 2] v = -2 4 1 0 2 1 2 >> w=[2 5 0 1 2 -1 3] w = 2 5 0 1 2 -1 3 >> % Part (a) >> ~v==~w ans = 1 1 0 0 1 1 1 >> % Part (b) >> w>=v ans = 1 1 0 1 1 0 1 >> % Part (c) >> v>~1*w ans = 0 1 1 0 1 1 1 >> % Part (d) >> v>-1*w ans = 0 1 1 1 1 0 1 >> 4 Chapter 6: Solved Problems 4. Use the vectors v and w from Problem 3. Use relational operators to create a vector u that is made up of the elements of v that are smaller than or equal to the elements of w. Solution Command Window: >> v=[-2 4 1 0 2 1 2]; >> w=[2 5 0 1 2 -1 3]; >> u=v(v<=w) u = -2 4 0 2 2 5. Evaluate the following expressions without using MATLAB. Check the answers with MATLAB. (a)0|7&9&–3 (b)7>6&~0<=2 (c) ~4<5|0>=12/6 (d) – 7<–5<–2&2+3<=15/3 Solution >> % Part (a) >> 0|7&9&-3 ans = 1 >> % Part (b) >> 7>6&~0<=2 ans = 1 >> % Part (c) >> ~4<5|0>=12/6 ans = 1 >> % Part (d) >> -7<-5<-2&2+3<=15/3 ans = 0 >> Chapter 6: Solved Problems 5 6. Use loops to create a matrix in which the value of each element is two times its row number minus three times its column number. For example, the value of element (2,5) is . Solution Script File for i=1:4 for j=1:6 A(i,j)=2*i-3*j; end end A Command Window: A = -1 -4 -7 -10 -13 -16 1 -2 -5 -8 -11 -14 3 0 -3 -6 -9 -12 5 2 -1 -4 -7 -10 7. Write a program that generates a vector with 30 random integers between –20 and 20 and then finds the sum of the all the elements that are divisible by 3. Solution Script File: v=randi([-20 20],1,30) n=length(v); S=0; for i=1:n if rem(v(i),3)==0 S=S+v(i); end end S 6 Chapter 6: Solved Problems Command Window: v = Columns 1 through 12 10 -10 0 8 16 19 2 -15 -14 - 10 14 -10 Columns 13 through 24 13 -11 18 -6 -12 -10 5 -1 -6 14 3 2 Columns 25 through 30 17 -9 11 10 -5 3 S = -24 8. Write a program that asks the user to input a vector of integers of arbitrary length. Then, using a for loop the program examine each element of the vec- tor. If the element is positive its value is doubled. If the element is negative its value is tripled. The program displays the vector that was entered and the modified vector. Execute the program and when the program ask the user to input a vector type randi([-10 20],1,19). This creates a 19-element vector with random integers between –10 and 20. Solution Script File: v=randi([-10 20],1, 19) n=length(v); for i=1:n if v(i) > 0 v(i)=2*v(i); end if v(i) < 0 v(i)= 3*v(i); end end vNew=v Command Window: v = Columns 1 through 15 Chapter 6: Solved Problems 7 -8 -9 6 14 18 -6 7 4 -10 0 -5 14 -1 6 -5 Columns 16 through 19 8 -2 10 11 vNew = Columns 1 through 15 -24 -27 12 28 36 -18 14 8 -30 0 -15 28 -3 12 -15 Columns 16 through 19 16 -6 20 22 9. Write a program that asks the user to input a vector of integers of arbitrary length. Then, using a for loop the program eliminates all the negative ele- ments. The program displays the vector that was entered and the modified vector, and a message that says how many elements were eliminated. Exe- cute the program and when the program ask the user to input a vector type randi([-15 20],1,25). This creates a 25-element vector with random integers between –15 and 20. Solution Script File: v=randi([-15 20],1, 25) n=length(v); j=0; for i=1:n if v(i) >= 0 j=j+1; vNew(j)=v(i); end end elim=n-j; vNew fprintf('%.0f elements were eliminated.\n',elim) Command Window: v = Columns 1 through 13 8 Chapter 6: Solved Problems 17 6 7 15 13 5 -9 -7 16 - 14 2 -9 20 Columns 14 through 25 10 3 1 -13 9 -14 -13 3 -12 14 14 11 vNew = Columns 1 through 13 17 6 7 15 13 5 16 2 20 10 3 1 9 Columns 14 through 17 3 14 14 11 8 elements were eliminated. 10. The daily high temperature (°F) in New York City and Denver, Colorado during the month of January 2014 is given in the vectors below (data from the U.S. National Oceanic and Atmospheric Administration). NYC = [33 33 18 29 40 55 19 22 32 37 58 54 51 52 45 41 45 39 36 45 33 18 19 19 28 34 44 21 23 30 39] DEN = [39 48 61 39 14 37 43 38 46 39 55 46 46 39 54 45 52 52 62 45 62 40 25 57 60 57 20 32 50 48 28] where the elements in the vectors are in the order of the days in the month. Write a program in a script file that determines and displays the following information: (a) The average temperature for the month in each city (rounded to the nearest degree). (b) The number of days that the temperature was above the average in each city. (c) The number of days that the temperature in Denver was higher than the temperature in New York. Solution Script File: clear, clc NYC = [33 33 18 29 40 55 19 22 32 37 58 54 51 52 45 41 45 ... 39 36 45 33 18 19 19 28 34 44 21 23 30 39]; DEN = [39 48 61 39 14 37 43 38 46 39 55 46 46 39 54 45 52 ... 52 62 45 62 40 25 57 60 57 20 32 50 48 Chapter 6: Solved Problems 9 28]; %Part (a) NYCav=round(mean(NYC)); DENav=round(mean(DEN)); fprintf('The averager temperature in New York City is: % g F.\n',NYCav) fprintf('The averager temperature in Denver is: % g F.\n',DENav) %Part (b) nNYC=sum(NYC>NYCav); nDEN=sum(DEN>DENav); fprintf('During % g days the temperature in New York City was above the average.\n',nNYC) fprintf('During % g days the temperature in Denver was above the average.\n',nDEN) %Part (c) DENhNYC=sum(DEN>NYC); fprintf('During % g days the temperature in Denver was higher than in New York City.\n',DENhNYC) Command Window: The averager temperature in New York City is: 35 F. The averager temperature in Denver is: 44 F. During 15 days the temperature in New York City was above the average. During 18 days the temperature in Denver was above the average. During 22 days the temperature in Denver was higher than in New York City. 10 Chapter 6: Solved Problems 11. The Pascal’s triangle can be displayed as elements in a 10 0 0 00 lower-triangular matrix as shown on the right. Write a 11 0 0 00 MATLAB program that creates a matrix that dis- plays n rows of Pascal’s triangle. Use the program to create 12 1 0 00 4 and 7 rows Pascal’s triangles. (One way to calculate the 13 3 1 00 value of the elements in the lower portion of the matrix is 14 6 4 10 15101051 .) Solution Script File: n=6; pt=zeros(n); for i=1:n for j=1:i pt(i,j)=factorial(i-1)/(factorial(j- 1)*factorial(i-j)); end end pt Command Window: pt = 1 0 0 0 0 0 1 1 0 0 0 0 1 2 1 0 0 0 1 3 3 1 0 0 1 4 6 4 1 0 1 5 10 10 5 1 Chapter 6: Solved Problems 11 12. Tribonacci numbers are the numbers in a sequence in which the first three elements are 0, 1, and 1, and the value of each subsequent element is the sum of the previous three elements: 0, 1, 1, 2, 4, 7, 13, 24, ..
Recommended publications
  • Under the Direction of Denise S
    EXPLORING MIDDLE GRADE TEACHERS’ KNOWLEDGE OF PARTITIVE AND QUOTITIVE FRACTION DIVISION by SOO JIN LEE (Under the Direction of Denise S. Mewborn) ABSTRACT The purpose of the present qualitative study was to investigate middle grades (Grade 5-7) mathematics teachers’ knowledge of partitive and quotitive fraction division. Existing research has documented extensively that preservice and inservice teachers lack adequate preparation in the mathematics they teach (e.g., Ball, 1990, 1993). Especially, research on teachers’ understanding of fraction division (e.g., Ball, 1990; Borko, 1992; Ma, 1999; Simon, 1993) has demonstrated that one or more pieces of an ideal knowledge package (Ma, 1999) for fraction division is missing. Although previous studies (e.g., Ball, 1990; Borko, 1992; Ma, 1999; Simon, 1993; Tirosh & Graeber, 1989) have stressed errors and constraints on teachers’ knowledge of fraction division, few studies have been conducted to explore teachers’ knowledge of fraction division at a fine-grained level (Izsák, 2008). Thus, I concentrated on teachers’ operations and flexibilities with conceptual units in partitive and quotitive fraction division situations. Specifically, I attempted to develop a model of teachers’ ways of knowing fraction division by observing their performance through a sequence of division problems in which the mathematical relationship between the dividend and the divisor became increasingly complex. This is my first step toward building a learning trajectory of teachers’ ways of thinking, which can be extremely useful for thinking about how to build an effective professional development program and a teacher education program. The theoretical frame that I developed for this study emerged through analyses of teachers’ participation in the professional development program where they were encouraged to reason with/attend to quantitative units using various drawings such as length and area models.
    [Show full text]
  • Counting Keith Numbers
    1 2 Journal of Integer Sequences, Vol. 10 (2007), 3 Article 07.2.2 47 6 23 11 Counting Keith Numbers Martin Klazar Department of Applied Mathematics and Institute for Theoretical Computer Science (ITI) Faculty of Mathematics and Physics Charles University Malostransk´en´am. 25 11800 Praha Czech Republic [email protected] Florian Luca Instituto de Matem´aticas Universidad Nacional Autonoma de M´exico C.P. 58089 Morelia, Michoac´an M´exico [email protected] Abstract A Keith number is a positive integer N with the decimal representation a a a 1 2 ··· n such that n 2 and N appears in the sequence (K ) given by the recurrence ≥ m m≥1 K = a ,...,K = a and K = K + K + + K for m>n. We prove 1 1 n n m m−1 m−2 ··· m−n that there are only finitely many Keith numbers using only one decimal digit (i.e., a = a = = a ), and that the set of Keith numbers is of asymptotic density zero. 1 2 ··· n 1 Introduction With the number 197, let (Km)m≥1 be the sequence whose first three terms K1 =1, K2 =9 and K3 = 7 are the digits of 197 and that satisfies the recurrence Km = Km−1 +Km−2 +Km−3 1 for all m> 3. Its initial terms are 1, 9, 7, 17, 33, 57, 107, 197, 361, 665,... Note that 197 itself is a member of this sequence. This phenomenon was first noticed by Mike Keith and such numbers are now called Keith numbers. More precisely, a number N with decimal representation a1a2 an is a Keith number if n 2 and N appears in the N N ··· ≥ sequence K = (Km )m≥1 whose n initial terms are the digits of N read from left to right N N N N and satisfying Km = Km−1 + Km−2 + + Km−n for all m>n.
    [Show full text]
  • Phd Complete Document
    Idiopathy: A Novel and ‘A Failed Entertainment:’ The Process of Paying Attention in and to Infinite Jest by Sam Byers Thesis submitted for the qualification of Doctor of Philosophy at The University of East Anglia, Department of Literature, Drama, and Creative Writing, September 2013. © This copy of the thesis has been supplied on condition that anyone who consults it is understood to recognize that its copyright rests with the author and that use of any information derived there from must be in accordance with current UK Copyright Law. In addition, any quotation or extract must include full attribution. WORD COUNT: 90,000 words + Appendix 2 Abstract My PhD thesis combines a novel, Idiopathy, and a critical essay, ‘A Failed Entertainment:’ The Process of Paying Attention In and To Infinite Jest. Idiopathy examines the inner lives of three friends and their experiences of both separation and a reunion. By emphasising internality over externality it seeks to examine the notion that how we feel about our lives may be more important, indeed, more ‘real,’ than what takes place around us. Idiopathy is overtly concerned with the extent to which interaction with others is problematic, and pays particular attention to the emotional complexities of friendships, relationships and family dynamics. Through these pained and frequently unsatisfactory interactions the novel seeks to satirise broader social phenomena, such as media panics, health epidemics, ideological protest movements and the rise of what might be termed a ‘pathologised’ culture, in which all the characters are continually concerned that something is ‘wrong’ with them. Illness is a metaphor throughout, and is explored not only through the characters’ sense of personal malaise, but also through the device of a fictional cattle epidemic that forms a media backdrop to unfolding events.
    [Show full text]
  • Section Handout
    CS106B Handout 11 Autumn 2012 October 1st, 2012 Section Handout This first week, I’m only including two problems, because introductions might take 15 or so of the 50 minutes we have. One of the problems is a discussion problem, and the other is written up as an informal coding exercise. However, I’ll always allow your section leader and your peers to decide if you’d rather adopt the collaborative discussion-problem format for both of them. Discussion Problem 1: Publishing Stories Social networking sites like Facebook, LinkedIn, and Google+ typically record and publish stories about actions taken by you and your friends. Stories like: Jessie Duan accepted your friend request. Matt Anderson is listening to Green Day on Spotify. Patrick Costello wrote a note called "Because Faiz told me to". David Wang commented on Jeffrey Spehar’s status. Mike Vernal gave The French Laundry a 5-star review. are created from story templates like {name} accepted your friend request. {name} is listening to {band} on {application}. {name} wrote a note called "{title}". {name} commented on {target}’s status. {actor} gave {restaurant} a {rating}-star review. The specific story is generated from the skeletal one by replacing the tokens—substrings like "{name}", "{title}", and "{rating}"—with event-specific values, like "Jessie Duan", "Because Faiz told me to", and "5". The token-value pairs can be packaged in a Map<string, string>, and given a story template and a data map, it’s possible to generate an actual story. 2 Write the generateStory function, which accepts a story template (like "{actor} gave {restaurant} a {rating}-star review.") and a Map<string, string> (which might map "actor" to "Mike Vernal", "restaurant" to "The French Laundry", and "rating" to "5"), and builds a string just like the story template, except the tokens have been replaced by the text they map to.
    [Show full text]
  • Solving Knapsack and Related Problems
    Solving knapsack and related problems Daniel Lichtblau Wolfram Research, Inc. 100 Trade Centre Dr. Champaign IL USA, 61820 [email protected] Abstract. Knapsack problems and variants thereof arise in several different fields from operations research to cryptography to really, really serious problems for hard−core puzzle enthusiasts. We discuss some of these and show ways in which one might formulate and solve them using Mathematica. 1. Introduction A knapsack problem is described informally as follows. One has a set of items. One must select from it a subset that fulfills specified criteria. A classical example, from cryptosystems, is what is called the "subset sum" problem. From a set S of numbers, and a given number k, find a subset of S whose sum is k. A variant is to find a subset whose sum is as close as possible to k. Another variant is to allow integer multiples of the summands, provided they are small. That is, we are to find a componentwise "small" vector v such that v.S » k (where we regard S as being an ordered set, that is, a vector). More general knapsack problems may allow values other than zero and one (typically selected from a small range), inequality constraints, and other variations on the above themes.. Of note is that the general integer linear programming problem (ILP) can be cast as a knapsack problem provided the search space is bounded. Each variable is decomposed into new variables, one for each "bit"; they are referred to as 0 −1 variables because these are the values they may take.
    [Show full text]
  • Numbers 1 to 100
    Numbers 1 to 100 PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Tue, 30 Nov 2010 02:36:24 UTC Contents Articles −1 (number) 1 0 (number) 3 1 (number) 12 2 (number) 17 3 (number) 23 4 (number) 32 5 (number) 42 6 (number) 50 7 (number) 58 8 (number) 73 9 (number) 77 10 (number) 82 11 (number) 88 12 (number) 94 13 (number) 102 14 (number) 107 15 (number) 111 16 (number) 114 17 (number) 118 18 (number) 124 19 (number) 127 20 (number) 132 21 (number) 136 22 (number) 140 23 (number) 144 24 (number) 148 25 (number) 152 26 (number) 155 27 (number) 158 28 (number) 162 29 (number) 165 30 (number) 168 31 (number) 172 32 (number) 175 33 (number) 179 34 (number) 182 35 (number) 185 36 (number) 188 37 (number) 191 38 (number) 193 39 (number) 196 40 (number) 199 41 (number) 204 42 (number) 207 43 (number) 214 44 (number) 217 45 (number) 220 46 (number) 222 47 (number) 225 48 (number) 229 49 (number) 232 50 (number) 235 51 (number) 238 52 (number) 241 53 (number) 243 54 (number) 246 55 (number) 248 56 (number) 251 57 (number) 255 58 (number) 258 59 (number) 260 60 (number) 263 61 (number) 267 62 (number) 270 63 (number) 272 64 (number) 274 66 (number) 277 67 (number) 280 68 (number) 282 69 (number) 284 70 (number) 286 71 (number) 289 72 (number) 292 73 (number) 296 74 (number) 298 75 (number) 301 77 (number) 302 78 (number) 305 79 (number) 307 80 (number) 309 81 (number) 311 82 (number) 313 83 (number) 315 84 (number) 318 85 (number) 320 86 (number) 323 87 (number) 326 88 (number)
    [Show full text]
  • Solving Knapsack Problems
    1 Solving knapsack problems Daniel Lichtblau Wolfram Research, Inc. 100 Trade Centre Dr. Champaign IL USA, 61820 [email protected] IMS 2004, Banff, Canada August 2004 Introduction Informal description of a knapsack problem: í One has a set of items. í One must select from it a subset that fulfills specified criteria. Classical Example: The "subset sum" problem, from cryptosystems í From a set S of numbers, and a given number k, find a subset of S whose sum is k. To be honest I am never certain of what specifically comprises a knapsack problem. I wanted to write up what I know about various types of problems that all seem to fall in or near the knapsack umbrella. I don’t know the correct definition of quadratic programs either, but that never stopped me from talking about them. 2 Acknowledgements (probably should be apologies) I thank Christian Jacob and Peter Mitic for allowing me to send a paper relatively late in the process. I had for some time wanted to write up whatever I know, or suspect, about knapsack problems. This conference was my incentive to do so. Alas, while I found that I could do many of things I had hoped, some problems proved elusive. I kept working at them after the paper went in, and so I now have an extended version as well. Not surprisingly, I STILL cannot solve all the problems I like to think fall into the knapsack category. So this may grow yet more. I also thank everyone whose methods and/or code I borrowed, adapted, or stole outright in the course of writing up the paper.
    [Show full text]
  • BRAIN TICKLERS Brain Ticklers
    BRAIN TICKLERS Brain Ticklers RESULTS FROM = 0. The generalized equation for a roots is 2/(3q0.5) for q ≥ 4, and 0.5 – q/24 SUMMER 2011 parabola is ax2 + bxy + cy2 + dx + ey for q ≤ 4, where b and c are both in the + f = 0, with the further condition that range ±q. At q = 4, both equations give Perfect b2 = 4ac, where a and c aren’t both a 1/3 probability. A requirement for the Brule, John D. MI B ’49 Couillard, J. Gregory IL A ’89 zero. (Wikipedia on the internet is one quadratic equation to have complex Gerken, Gary M. CA H ’11 source of these requirements.) Sub- roots is c > b2/4. Prepare a set of Car- Rasbold, J. Charles OH A ’83 Spong, Robert N. UT A ’58 stituting data points (3,0) and (-1,0) tesian coordinates with c on the ver- *Thaller, David B. MA B ’93 in the generalized equation yields e = tical axis and b on the horizontal axis, -2c. And, substituting (0,1) and (0,-1) and plot the parabola c = b2/4. Draw a Other Aron, Gert IA B ’58 yields d = 0 and a = -f. The generalized square with sides b = ±q and c = ±q. Beaudet, Paul R. Father of member equation then reduces to ax2 + bxy + The region yielding complex roots is Bertrand, Richard M. WI B ’73 2 Conway, David B. TX I ’79 cy - 2cy – a = 0. Now, substituting bounded below by the parabola and Davis, John H. OH G ’60 data point (3,0) in this equation gives above and on the right by the square.
    [Show full text]
  • Subject Index
    Subject Index Many of these terms are defined in the glossary, others are defined in the Prime Curios! themselves. The boldfaced entries should indicate the key entries. γ 97 Arecibo Message 55 φ 79, 184, see golden ratio arithmetic progression 34, 81, π 8, 12, 90, 102, 106, 129, 136, 104, 112, 137, 158, 205, 210, 154, 164, 172, 173, 177, 181, 214, 219, 223, 226, 227, 236 187, 218, 230, 232, 235 Armstrong number 215 5TP39 209 Ars Magna 20 ASCII 66, 158, 212, 230 absolute prime 65, 146, 251 atomic number 44, 51, 64, 65 abundant number 103, 156 Australopithecus afarensis 46 aibohphobia 19 autism 85 aliquot sequence 13, 98 autobiographical prime 192 almost-all-even-digits prime 251 averaging sets 186 almost-equipandigital prime 251 alphabet code 50, 52, 61, 65, 73, Babbage 18, 146 81, 83 Babbage (portrait) 147 alphaprime code 83, 92, 110 balanced prime 12, 48, 113, 251 alternate-digit prime 251 Balog 104, 159 Amdahl Six 38 Balog cube 104 American Mathematical Society baseball 38, 97, 101, 116, 127, 70, 102, 196, 270 129 Antikythera mechanism 44 beast number 109, 129, 202, 204 apocalyptic number 72 beastly prime 142, 155, 229, 251 Apollonius 101 bemirp 113, 191, 210, 251 Archimedean solid 19 Bernoulli number 84, 94, 102 Archimedes 25, 33, 101, 167 Bernoulli triangle 214 { Page 287 { Bertrand prime Subject Index Bertrand prime 211 composite-digit prime 59, 136, Bertrand's postulate 111, 211, 252 252 computer mouse 187 Bible 23, 45, 49, 50, 59, 72, 83, congruence 252 85, 109, 158, 194, 216, 235, congruent prime 29, 196, 203, 236 213, 222, 227,
    [Show full text]
  • Approved Minutes Fall 2017
    ArizMATYC Business Meeting Minutes Fall 2017 Friday, October 6, 2017 3:15 - 4:15 pm Chandler-Gilbert Community College SC 140s Present: April Strom (SCC), Anne Dudley (Ret), Andy Burch (EMCC), Dave Graser (YC), Laura Watkins (GCC), Matthew Michaelson (GCC), Eli Blake (NPC), Kate Kozak (CCC), Jenni Jameson (CCC), David Dudley (SCC), Kristina Burch (GCC), Trey Cox (CGCC), Francis Su (Harvey Mudd), Ana Jimenez (Pima), Shannon Ruth (GWCC) Meeting called to order at 3:21pm 1. Approval of Minutes [Spring 2017 Meeting Minutes] ​ ​ a. Need to revisit the Constitution and Bylaws comments from Anne from Spring 2017 Minutes b. Anne motioned to approve; Laura seconded; passed unanimously 2. Conference Report - a. At least 85 people pre-registered, plus ATF 3. President Report - April Strom a. Spring 2018 – April 6-7 - MAA/ArizMATYC Joint Meeting @ Pima CC Desert ​ Vista Campus [contact: Ana Jimenez/Diana Lussier] ​ i. Two national speakers -- Tensia Soto (assessment) & Linda Braddy (MAA ​ IP guide) ​ b. Review ArizMATYC website -- any thoughts on changes or updates? ​ ​ i. Laura: would it be helpful to have a link to AZ Transfer, other useful links? ii. Dave: we could, but would need to switch to a different website template - can give us example(s) to consider (like math-faq.com, using WordPress2016) iii. Kate: concerns about being ADA compliant? 1 iv. Anne: not clear that “Google Group” is how to join communication group - change to “Join Us” or something more intuitive; also need to make sure we make Meeting information easily accessible and easy to find v. Matt: add links to jump to various parts of meeting information vi.
    [Show full text]
  • Section Handout #1: Collections, File Reading, Big-O Based on Handouts by Various Current and Past CS106B/X Instructors and Tas
    Nick Troccoli Section #1 CS 106X Week 2 Section Handout #1: Collections, File Reading, Big-O Based on handouts by various current and past CS106B/X instructors and TAs. 1. Mirror (Grid) Write a function mirror that accepts a reference to a grid of integers as a parameter and flips the grid along its diagonal, so that each index [i][j] contains what was previously at index [j][i] in the grid. You may assume the grid is square, that is, it has the same number of rows as columns. For example, the grid below on the left would be altered to give it the new grid state on the right: {{ 6, 1, 9, 4}, {{6, -2, 14, 21}, {-2, 5, 8, 12}, {1, 5, 39, 55}, {14, 39, -6, 18}, --> {9, 8, -6, 73}, {21, 55, 73, -3}} {4, 12, 18, -3}} Bonus: How would you solve this problem if the grid were not square? 2. reorder (Stack, Queue) Write a function named reorder that takes a queue of integers that are already sorted by absolute value, and modifies it so that the integers are sorted normally. Use a single Stack<int> to help you. For example, passing in the Queue below on the left would alter it to the new queue state on the right: {1, -2, 3, 4, -5, -6, 7} --> {-6, -5, -2, 1, 3, 4, 7} 3. Stack(s) as a Queue (Stack, Queue) Your job is to implement a Stack<int> using one or more Queues. That is, you will be responsible for writing the push and pop methods for a Stack<int> but your internal data representation must be a Queue: void push(Queue<int>& queue, int entry) int pop(Queue<int>& queue) Bonus: Conceptually, how would you implement a Queue using only one or more Stacks? 4.
    [Show full text]
  • Dictionary of Mathematics
    Dictionary of Mathematics English – Spanish | Spanish – English Diccionario de Matemáticas Inglés – Castellano | Castellano – Inglés Kenneth Allen Hornak Lexicographer © 2008 Editorial Castilla La Vieja Copyright 2012 by Kenneth Allen Hornak Editorial Castilla La Vieja, c/o P.O. Box 1356, Lansdowne, Penna. 19050 United States of America PH: (908) 399-6273 e-mail: [email protected] All dictionaries may be seen at: http://www.EditorialCastilla.com Sello: Fachada de la Universidad de Salamanca (ESPAÑA) ISBN: 978-0-9860058-0-0 All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording or by any informational storage or retrieval system without permission in writing from the author Kenneth Allen Hornak. Reservados todos los derechos. Quedan rigurosamente prohibidos la reproducción de este libro, el tratamiento informático, la transmisión de alguna forma o por cualquier medio, ya sea electrónico, mecánico, por fotocopia, por registro u otros medios, sin el permiso previo y por escrito del autor Kenneth Allen Hornak. ACKNOWLEDGEMENTS Among those who have favoured the author with their selfless assistance throughout the extended period of compilation of this dictionary are Andrew Hornak, Norma Hornak, Edward Hornak, Daniel Pritchard and T.S. Gallione. Without their assistance the completion of this work would have been greatly delayed. AGRADECIMIENTOS Entre los que han favorecido al autor con su desinteresada colaboración a lo largo del dilatado período de acopio del material para el presente diccionario figuran Andrew Hornak, Norma Hornak, Edward Hornak, Daniel Pritchard y T.S. Gallione. Sin su ayuda la terminación de esta obra se hubiera demorado grandemente.
    [Show full text]