46 Pages

11-ProbabilityUncertainty

Course: CS 480, Fall 2009
School: Illinois Tech
Rating:
 
 
 
 
 

Word Count: 2553

Document Preview

Representing CS-480: Uncertainty Chapter 13 Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule Uncertainty Define action At = leave for airport t minutes before flight to Hong Kong Q: Will At get me there on time? Problems: 1. 2. 3. 4. partial observability (road state, other drivers' plans, etc.) noisy sensors (traffic reports) uncertainty in action outcomes (flat...

Register Now

Unformatted Document Excerpt

Coursehero >> Illinois >> Illinois Tech >> CS 480

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Representing CS-480: Uncertainty Chapter 13 Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule Uncertainty Define action At = leave for airport t minutes before flight to Hong Kong Q: Will At get me there on time? Problems: 1. 2. 3. 4. partial observability (road state, other drivers' plans, etc.) noisy sensors (traffic reports) uncertainty in action outcomes (flat tire, etc.) immense complexity of modeling and predicting traffic Purely logical approach either 1. 2. risks falsehood: A95 will get me there on time, or leads to conclusions that are too weak for decision making: A95 will get me there on time if there's no accident on the bridge and it doesn't rain and my tires remain intact etc etc. (A1440 might reasonably be said to get me there on time but I'd have to stay overnight in the airport ) Methods for handling uncertainty Default or nonmonotonic logic: Assume my car does not have a flat tire Assume A95 works unless contradicted by evidence But What assumptions are reasonable? How to handle contradiction? Inference rules with confidence factors: A95 |0.3 get there on time Sprinkler | 0.99 WetGrass WetGrass | 0.7 Rain But how to combine these? e.g., Sprinkler causes Rain? Or can I infer WetGrass from Rain? Probability Model agent's degree of belief with formal calculus for inference E.g., Given the available evidence, A95 will get me there on time with probability 0.04 Two Views of Probability Classical (or Frequentist) view: Probability of 0.4 (say) means: In an infinite series of repetitions of the identical event, 40% of cases will give a certain result But: What of unique events? What constitute identical events? Bayesian (or Subjectivist) view: Probability is subjective degree of belief in a proposition given state of knowledge Define reasonable axioms to give a full calculus Requires assuming prior probability distributions (making arbitrary assumptions explicit) Subjectivist Probability Probabilistic assertions summarize effects of laziness: failure to enumerate exceptions, qualifications, etc. ignorance: lack of relevant facts, initial conditions, etc. Subjective probability: Probabilities relate propositions to agent's own state of knowledge e.g., P(A95 | no reported accidents) = 0.06 These are not assertions about the world Probabilities of propositions change with new evidence: e.g., P(A95 | no reported accidents, 5 a.m.) = 0.15 Making decisions under uncertainty Suppose I believe the following: P(A95 gets me there on time | ) P(A120 gets me there on time | ) P(A150 gets me there on time | ) P(A1440 gets me there on time | ) = 0.04 = 0.70 = 0.95 = 0.9999 Which action to choose? Depends on my preferences for missing flight vs. time spent waiting, etc. Utility theory is used to represent and infer preferences Decision theory = probability theory + utility theory Boolean Random Variables We call A a boolean random variable if A denotes some event about which there is uncertainty as to its occurrence A = The president in 2013 will be female A = You will have a headache tomorrow A = You have the flu A = Five students were born on Tuesday Probability: Intuitive P(A) denotes fraction of possible worlds (given what I know) in which A is true Event Space of all possible worlds Total area = 1 Worlds in which A is true We could discuss the philosophy of this idea for hours. but we wont! P(A) = area of red oval Worlds in which A is false Probability: Axioms 0 P(A) 1 P(true) = 1 P(false) = 0 P(A B) = P(A) + P(B) - P(A B) Probability: Axioms 0 P(A) 1 P(true) = 1 P(false) = 0 P(A B) = P(A) + P(B) - P(A B) Red oval cant get smaller than 0 Area of 0 means that A is true in no possible worlds Worlds in which A is false Probability: Axioms 0 P(A) 1 P(true) = 1 P(false) = 0 P(A B) = P(A) + P(B) - P(A B) Red oval cant get larger than 1 Area of 1 means that A is true in all possible worlds Worlds in which A is true Worlds in which A is false Probability: Axioms 0 P(A) 1 P(true) = 1 P(false) = 0 P(A or B) = P(A) + P(B) - P(A & B) Worlds in which A is true Size of union is sum of sizes minus size of intersection A&B are true Worlds in which B is true Thou Shalt Not Mess With The Axioms of Probability! There have been many other attempted methodologies for uncertainty: Fuzzy logic Dempster-Shafer theory Three-valued logic Nonmonotonic logics Etc., etc., But only probability has the property: If you gamble according to the axioms of probability, you cant be unfairly exploited by someone using a different system. (di Finetti 1931) Some Provable Facts Axioms: 0 P(A) 1 P(true) = 1 P(false) = 0 P(A B) = P(A) + P(B) - P(A B) We can show that: P(~A) = P(not A) = 1 - P(A) And furthermore: P(A) = P(A & B) + P(A & ~B) Multivalued Random Variables Suppose A can take on more than 2 values e.g., Weather is one of {sunny,rainy,cloudy,snow} Call A a random variable with arity k if it can take on one of k different values in some set {v1, v2, , vk} Thus: P(A=vi & A=vj) = 0 if i j P(A=v1 A=v2 A=vk) = 1 Easy Facts About Multivalued RVs Axioms: 0 P(A) 1; P(true) = 1; P(false) = 0 P(A B) = P(A) + P(B) - P(A B) Recall: P(A=vi & A=vj) = 0 if i j ; P(A=v1 A=v2 A=vk) = 1 We can show that: i P(A = v1A = v2 L A = vi) = P(A = vj) j=1 And therefore: k P(A = v1L A = vk) = P(A = vj) j=1 More Facts About Multivalued RVs Axioms: 0 P(A) 1; P(true) = 1; P(false) = 0 P(A B) = P(A) + P(B) - P(A B) Recall: P(A=vi & A=vj) = 0 if i j ; P(A=v1 A=v2 A=vk) = 1 We can show that: i P(B [A = v1L A = vi]) = P(B A = vj) j=1 And therefore: k P(B) = P(B A = vj) j=1 Conditional Probability P(A|B) = probability of A given B = fraction of possible worlds with B true that also have A true Worlds in which A is true P(Headache) = 0.1 P(Flu) = 0.02 P(Headache|Flu) = 0.5 Headaches are rare, Flu is much rarer, but if you have the Flu, you have a 50-50 chance of having a headache. A&B are true Worlds in which B is true Conditional probability Conditional or posterior probabilities e.g., P(cavity | toothache) = 0.8 i.e., given that toothache is all I know Notation for conditional distributions: P(Cavity | Toothache) = 2-element vector of 2-element vectors If we know more, e.g., cavity is also given, then we have P(cavity | toothache,cavity) = 1 New evidence may be irrelevant, e.g., P(cavity | toothache, sunny) = P(cavity | toothache) = 0.8 Such simplification, based on domain knowledge, is crucial Conditional Probability Formal definition: P(A B) P(A | B) = P(B) Thus, the Chain Rule: P(A B) = P(A | B)P(B) P(A1A2 L An) = P(A1 | A2L An)P(A2 | A3L An)L P(An) Syntax Summary Basic element: random variable Similar to propositional logic: possible worlds defined by assignment of values to random variables. Boolean random variables e.g., Cavity (do I have a cavity?) Multivalued random variables e.g., Weather is one of <sunny,rainy,cloudy,snow> Domain values exhaustive and mutually exclusive Elementary proposition constructed by assignment of a value to a Complex propositions formed from elementary propositions and standard logical connectives e.g., Weather = sunny Cavity = false Atomic Events Atomic event: A complete specification of the state of the world about which the agent is uncertain E.g., if the world consists of only two Boolean variables Cavity and Toothache, then there are 4 distinct atomic events: Cavity = false Toothache = false Cavity = false Toothache = true Cavity = true Toothache = false Cavity = true Toothache = true Atomic events are mutually exclusive and exhaustive Prior probability Prior or unconditional probabilities of propositions e.g., P(Cavity = true) = 0.1 and P(Weather = sunny) = 0.72 correspond belief to prior to arrival of any (new) evidence Probability distribution gives values for all possible assignments: P(Weather) = <0.72,0.1,0.08,0.1> (normalized, i.e., sums to 1) Joint probability distribution for a set of random variables gives the probability of every atomic event on those random variables P(Weather,Cavity) = a 4 2 matrix of values: Weather = Cavity = true Cavity = false sunny 0.144 0.576 rainy 0.02 0.08 cloudy 0.016 0.064 snow 0.02 0.08 Every question about a domain can be answered by the joint distribution Inference Generally: Given some information about the probability distribution, determine the probability of some proposition = Cavity = Cavity & Toothache = ~Study & (GoodGrade or GoodJob) Inference by enumeration Start with the joint probability distribution: For any proposition , sum the atomic events where it is true: P() = : P() Inference by enumeration Start with the joint probability distribution: For any proposition , sum the atomic events where it is true: P() = : P() P(toothache) = 0.108 + 0.012 + 0.016 + 0.064 = 0.2 Inference by enumeration Start with the joint probability distribution: For any proposition , sum the atomic events where it is true: P() = : P() P(toothache or cavity) = 0.108 + 0.012 + 0.016 + 0.064 +0.072 + 0.008= 0.28 Inference by enumeration Start with the joint probability distribution: Can also compute conditional probabilities: P(cavity | toothache) = P(cavity toothache) P(toothache) = 0.016+0.064 0.108 + 0.012 + 0.016 + 0.064 = 0.4 Normalization Denominator can be viewed as a normalization constant = [P(Cavity,toothache,catch) + P(Cavity,toothache,catch)] = [<0.108,0.016> + <0.012,0.064>] = <0.12,0.08> = <0.6,0.4> P(Cavity | toothache) = P(Cavity,toothache) General idea: compute distribution on query variable (Cavity) by fixing evidence variables (Toothache) and summing over hidden variables (Catch) Inference by enumeration Typically, we want P(Y | E = e): posterior joint distribution of the query variables Y given specific values e for the evidence variables E Let the hidden variables be H = X \ (Y E) Then we can just sum over the hidden variables and normalize: P(Y | E = e) = P(Y,E = e) = [hP(Y,E= e, H = h)] Terms are atomic events, because Y E H = X Obvious problems: 1. Worst-case time complexity O(dn) where d is the largest arity 2. Space complexity O(dn) to store the joint distribution 3. How to find the numbers for O(dn) entries in the joint distribution? 4. Independence Two boolean random variables A and B are said to be independent if and only if P(A|B) = P(A) Equivalently P(B|A) = P(B) That is, the probability we give A (or B) is not affected by finding out that B (or A) Independence Facts If A and B are independent boolean RVs: P(A & B) = P(A | B) P(B) = P(A) P(B) P(~A|B) = 1-P(A|B) = 1-P(A) = P(~A) P(A|~B) = P(A & ~B) / P(~B) = P(~B | A)P(A) / P(~B) = P(~B)P(A) / P(~B) = P(A) Multivalued Independence For multivalued RVs A and B, A is independent of B iff u,v : P(A = u | B = v) = P(A = u) From which we can show, for example: u,v : P(A = u B = v) = P(A = u)P(B = v) " u,v : P(B = v | A = u) = P(B = v) So, suppose our domain knowledge allows us to make certain independence assumptions on our random variables: Independence P(Toothache, Catch, Cavity, Weather) = P(Toothache, Catch, Cavity) P(Weather) 16 entries reduced to 10 (really 8); For n independent biased coins, O(2n) O(n) Absolute independence powerful but rare Dentistry is a large field with hundreds of variables, none of which are really independent of each other. What to do? Conditional independence P(Toothache, Cavity, Catch) has 23 1 = 7 independent entries If I have a cavity, the probability that the probe catches in it doesn't depend on whether I have a toothache: (1) P(catch | toothache, cavity) = P(catch | cavity) The same independence holds if I haven't got a cavity: (2) P(catch | toothache,cavity) = P(catch | cavity) Catch is conditionally independent of Toothache given Cavity: P(Catch | Toothache,Cavity) = P(Catch | Cavity) Equivalent statements: P(Toothache | Catch, Cavity) = P(Toothache | Cavity) P(Toothache, Catch | Cavity) = P(Toothache | Cavity) P(Catch | Cavity) Conditional independence Get the full joint distribution using chain rule: P(Toothache, Catch, Cavity) = P(Toothache | Catch, Cavity) P(Catch, Cavity) = P(Toothache | Catch, Cavity) P(Catch | Cavity) P(Cavity) = P(Toothache | Cavity) P(Catch | Cavity) P(Cavity) Based on only 2 + 2 + 1 = 5 independent parameters In most cases, the use of conditional independence reduces the siz...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Illinois Tech - CS - 445
OOP Class 2CS445ObjectOrientedDesignandProgrammingAn Object of classOPERATIONSSet Increment Write. . .TimeDATAPrivate data: hrs mins secs 8 25 42TimeCS445ObjectOrientedDesignandProgrammingDefinitionsCS445ObjectOrientedDesignandPr
Illinois Tech - CS - 480
Informed SearchChapter 4Outline Informed = use problem-specific knowledge Which search strategies? Best-first search and its variants Heuristic functions? How to invent them Local search and optimization Hill climbing, local beam search,
Illinois Tech - CS - 445
Input/Output OperationsWe did Dialog Box Java console (System.in) Scanner ClassTopics The java.io Package Reading from the Java Console Reading and Writing Text Files Reading Structured Text Files Using StringTokenizer Reading and Writing Obj
Illinois Tech - CS - 480
Intelligent AgentsChapter 2What is an Agent? An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuatorsSome Kinds of Agents Human agent: Sensors: Eyes, ears, nose,
Illinois Tech - CS - 445
ArraysCS 445Topics Single-Dimensional Arrays Declaring and Instantiating Arrays Accessing Array Elements Writing Methods Aggregate Array Operations Using Arrays in Classes Searching and Sorting Arrays Using Arrays as Counters Iterator Obj
Illinois Tech - CS - 445
Java AppletsCS445 Object Oriented Design and ProgrammingTopics Applet Structure Executing an Applet Applet Life Cycle Drawing Shapes with Graphics Methods Using Colors and Fonts Etc.CS445 Object Oriented Design and ProgrammingApple
Illinois Tech - CS - 445
Design PatternCS5851/Software Design Patterns Published by Gamma et al. 23 commonly used design patterns Creational Patterns Object creation Structural Patterns Static composition of classes Behavioral Patterns Dynamic interaction am
Illinois Tech - CS - 445
Design PatternCS5851/OO Generic Design Activities Find Classes Factor objects form classes Define class interfaces Define Inheritance Hierarchies Find relationships between class Goals Avoid Redesign Keep your design open Reuse as mu
Illinois Tech - CS - 445
ObjectOriented Design and Programming CS445 Threads in JavaIllinois Institute of TechnologyThreadsA Thread is single line of execution or a program unit that is executed independently of other parts of the program JVM executes each
Illinois Tech - CS - 445
Abstract Classes and Methods InterfacesCS445 Object Oriented Design and Programmingabstract Classes and MethodsAn abstract class is a class that is not completely implemented. Usually, the abstract class contains at least one abstract me
Illinois Tech - CS - 445
JavaCS445 Object Oriented Design and ProgrammingTopics Class Basics and Benefits Creating Objects Using Constructors Calling Methods Using Object References Calling Static Methods and Using Static Class Variables Using Predefined Java
Illinois Tech - CS - 445
Java AppletsCS445ObjectOrientedDesignandProgrammingTopics Applet Structure Executing an Applet Applet Life Cycle Drawing Shapes with Graphics Methods Using Colors and Fonts Etc.CS445ObjectOrientedDesignandProgrammingAppletsExecute
Illinois Tech - CS - 445
Design and Implementation ConceptsCS445 Object Oriented Design and ProgrammingDesign Concepts Public and Helper Classes Ordering Class Members Class Organization Design Guidelines Javadoc Canonical Form of Classes No-arg Construct
Illinois Tech - CS - 480
CS-480 Logical Agents and InferenceAIMA, Chapter 7Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem proving
Illinois Tech - CS - 441
Grading Criteria for Project Part-B FALL 2007NAMES: _Design:1. javadocs : authors and version variables all methods all classes 2. DESCRIPTIONS IN WORD DOCUMENT:Points: 4 1 1 1 1 1--Total 5Code and Presentation: FUNCTIONALITY/APPEARANCE1.
Illinois Tech - CS - 441
Grading Criteria for Project Part-B SPRING 2008NAMES: _Design:1. javadocs : authors and version variables all methods all classes 2. DESCRIPTIONS IN WORD DOCUMENT:Points: 4 1 1 1 1 1--Total 5Code and Presentation: FUNCTIONALITY/APPEARANCE1
Illinois Tech - CS - 201
CS201 In Class Assignment - Form groups of 3 or 4 students. Your group will be assigned an example implementation of the below problem (A, B or C). I have also emailed all three implementations to everyone. By the end of class today, have your group
Illinois Tech - CS - 201
CS201 EXAM 1 Fall 2007 NAME _ 1. (20 points) Write a java code segment that will determine if the digits of a user entered, threedigit number are all odd, all even, or mixed odd and even. You can assume the user enters an integer.
Illinois Tech - CS - 201
CS201INCLASSASSIGNMENTNAME_SomepracticeonRecursion Writerecursive methods forthefollowing: 1. Calculate thenth term inthefibonaccisequence 2. Find thelargest integer inan array and return itsindex 3. Doalinear search forakeyonan array ofintegers,
Illinois Tech - CS - 201
CS201Fall2007EXAM#3NAME_ 1)(25points)WriteaVehicleclassforatollbooth collection system (standard cartollof50centsfor automatic,$1formanual) with thefollowing: Necessary constants Instance variables fortheVehicle's o tolltype String,A forautomatic,M
Illinois Tech - CS - 201
CS201EXAM2Fall2007 NAME_ 1.(50points)Writeaprogram that plays aguessing game. Thegame willpickarandom number between 2 setvalues (alow limitand high limit)and prompt theuser toguess that number untilheorsheguesses correctly.On each wrong guess,thega
Illinois Tech - CS - 201
CS201INCLASSASSIGNMENTNAME_Designandimplemementaclassforastopwatch.Allowtheusertostart,stopandresetthestopwatchanddisplay (toString)thetimeinseconds. ExtraCredit:Display(toString)thetimeashh:mm:ssLimitthetimeyoucancountto24hours,thenrolloverto0ag
Illinois Tech - CS - 201
CS201INCLASSASSIGNMENTNAME_SomepracticeonInhertiance Suppose you wanted aclassthat would allow you touse fractions inaprogram (weareNOT reducing orsimplifying fractions).Remember avalid fraction isan integer over anonzero integer. Wewant both a
Illinois Tech - CS - 201
CS201 EXAM 2 MAKEUP Fall 2007 NAME _ 1. (50 points) Write a program that plays a guessing game. The game will pick a random number between 2 set values (a low limit and high limit) and prompt the user to guess that number until
Illinois Tech - CS - 201
CS201 PLACEMENT EXAM 45 MINUTES NAME _ 1. Please write code / pseudocode for two new functions for the &quot;ThreeIntMath &quot; class: &quot;polynomial&quot; that assumes the three integers x, y, z, for an object are the integer coefficients of a pol
Illinois Tech - CS - 115
CS 115 FALL 2007 Lab Problem #12 CD Compilation Part A, IndividualIndividually read the memo and article below.Internal Memo Brand New Sound Co. To: New Hire Engineering Team From: Billy Valens, Vice President of Marketing Re: Product Mixing Hel
Illinois Tech - CS - 441
SPRING 08 Project B Version 1You must answer the questions below which are worth 10 points. Every point you loose by not giving the correct answer gets subtracted from your grade for your project during your presentation. Question 1: In a a RMI dis
Illinois Tech - CS - 116
102726710 graduated104685526 graduated105708840 inactive106703604 inactive108788932 inactive110724715 graduated112482628 inactive-n113740426 graduated115863141 graduated116729274 inactive117669891 graduated118703144 inactive118726395 inac
Illinois Tech - CS - 116
IIT - CS116 Lab 0file:/C|/Bauer/CS116/www/labs/Lab0/Lab0.htmCS 116 - Lab 0 Objectives:1. 2. 3. 4. 5. 6.Tasks:Enter, compile, and run simple Java programs without using an IDE. (the standard &quot;Hello World!&quot; first program). Recognize syntax err
Illinois Tech - CS - 116
Encapsulation &amp; Selection1EncapsulationClass implementation details are hidden from the programmer who uses the class. This is called encapsulation Public methods of a class provide the interface between the application code and the class object
Illinois Tech - CS - 116
Chapter 9 TopicsAtomic Data Types q Composite Data Types q One-Dimensional Arrays q Examples of Declaring and Processing Arrays q Arrays of Objects q Arrays and Methods q Special Kinds of Array Processingq1Java Primitive Data Typesprimitivein
Illinois Tech - CS - 116
Chapter 10 Inheritance, Polymorphism, and Scope1Chapter 10 Topicsq qq q q q q qInheritance Inheritance and the Object-Oriented Design Process How to Read a Class Hierarchy Derived Class Syntax Scope of Access Implementing a Derived Class Copy
Illinois Tech - CS - 116
Chapter 11 Array-Based Lists1Chapter 11 Topicsqq q q qq qInsertion into and Deletion from an Unordered List Straight Selection Sort Insertion into and Deletion from a Sorted List Abstract classes Searching s Sequential s Binary Complexity o
Illinois Tech - CS - 116
q Chapter q Writing7.8 - Exceptionsto a File Complexityq Algorithmic1ExceptionsqIllegal operations at run time can generate an exception, for example:s ArrayIndexOutOfBoundsException s ArithmeticException s NullPointerException s InputM
Illinois Tech - CS - 116
Chapter 8 Object-OrientedSoftware Design and Implementation TopicsSoftware Design Strategies q Objects and Classes Revisited q Object-Oriented Design q The CRC Card Design Process q Functional Decomposition q Object-Oriented Implementationq1So
Illinois Tech - CS - 116
1.(5 points) Understand and correct Java compile errors and runtime errors (conditions and iteration). Programming and Problem Solving with Java, Page 271, #10if (Math.abs(x2-x1)&lt;.00001) System.out.println(&quot;Slope undefined&quot;);else { m=(y2-y1)/(
Illinois Tech - CS - 116
1. (10 points) Determine the time complexity of simple algorithms. PREDICTED WHYSELECTION SORT n^2 2 nested loopsRANDOM inner loop n, n-1, n-2, n-3, etc n+(n-1)+(n-2)+. =
Illinois Tech - CS - 116
1.(6 points) Explain the basics of the concept of recursion. 1. (A) The number of elements in arr that are less than num 2. (D) 43211234 3. (D) 2432.(14 points) Design/Code an object for a multi-object application containing inheritance.
Illinois Tech - CS - 116
0.0178173520.0240969550.0482115620.0697062060.0787579870.0821025160.0851559690.0887409080.094427750.1313963520.133466550.1475134060.1476946620.1611041470.1623873830.1654102610.1658394070.1789697390.1838542270.1955364310.210542828
Illinois Tech - CS - 116
1. (20 points) Design a user-defined object containing an array. (CONTINUATION OF LAB 2,5,6)There is ALOT of flexibility on student answers on this one.Key idea is how they are protecting the cases from EVERYONE until you open a case.public cla
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #10 ARRAYLIST SOLUTIONExercise #1 = #4: See ExerciseApp in suggested coded solution. Solution: I took a List class and derived a UserList class and overrode some methods. Most students will just create a UserLis
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #5 ARRAYS SOLUTION Homework: Programming &amp; Problem Solving with Java,2nd Ed, Dale &amp; Weems: p. 518: #1, #2, #3 Exercise #1: See coded solution. Exercise #2: See coded solution. Write the pseudocode to solve this pr
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #3 SELECTION + DEBUG SOLUTIONHomework: Programming &amp; Problem Solving with Java,2nd Ed, Dale &amp; Weems: (1 point) p. 270: #6, 9, 10, 116.if (year % 4 = 0) System.out.print(year + &quot; is a leap year.&quot;); else { year
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #9 POLYMORPHISM Objective 1. 2. 3. 4.To learn to use polymorphism. To learn to read and handle an input file with two input formats. To learn to use an Abstract class. To learn the difference between private and
Illinois Tech - CS - 116
CS 116SPRING 2008 WEEKLY LAB PROBLEM #11 SEARCHING AND SORTING AN ARRAY LIST SOLUTION Ex. #1: See exercises package. Test valuepluShort.txtSearch result before selection sort:found 3016 at: 56 found 3082 at: 28 found 3251 at: -1 found 3161 at: 48
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #2 USER-DEFINED CLASS + APPLICATION Objective: 1. Learn to write java arithmetic expressions. 2. Learn to use explicit casting. 3. Learn to use static methods from the Math API 4. Learn to use precedence of operat
Illinois Tech - CS - 116
CS 116 SPRING 2008, Sec. 3-6 LAB #1 USER-DEFINED CLASS WITH STATIC METHODS SOLUTION Homework: p. 100, #15: (1 point)This program may be corrected in several ways. Here is one correct version: public class LotsOfErrors { public static void main(Stri
Illinois Tech - CS - 116
CS 116SPRING 2007 WEEKLY LAB PROBLEM #8A ID ARRAY LIST Object: To learn how to implement an array list of objects Problem: The philanthropic organization would like to be able to have non-technical personnel manipulate the data stored in the data st
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #8 INHERITANCE, COMPOSITION SOLUTIONExercise #1:Rectangle: length: 4 width: 5 area 20 perimeter: 18 Box: length: 8 width: 6 area 48 perimeter: 28 depth: 4 volume: 192Exercise #2:Length: 8 Width: 6 Width: 12
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #4 ITERATION, FILE I/O SOLUTIONHomework: Programming &amp; Problem Solving with Java,2nd Ed, Dale &amp; Weems: p. 333: #2, 3, 5, 8, 10, 11 Grade #2, 5, 10 1 point apiece2. while ( ! dangerous ) { pressure = datain.nex
Illinois Tech - CS - 116
CS 116SPRING 2008 WEEKLY LAB PROBLEM #11 SEARCHING AND SORTING AN ARRAY LIST Objective: 1. To start coding your final project. 2. To search an array of objects using sequential search. 3. To sort an array of objects using selection sort. 4. To search
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #9 POLYMORPHISM SOLUTION Exercise #1: See ex1_4 Exercise #2: See ex1_4 Exercise #3: See ex1_4. Be sure student have called the correct calcArea() method using polymorphism. Exercise #4: See ex 1_4. Be sure the stu
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #4 ITERATION, FILE I/OObjective: 1. To learn to use iteration to solve a problem. 2. To learn to read and process data from a file. 3. To learn to merge two files. 4. To learn to use nested loops. Homework: Prog
Illinois Tech - CS - 115
Poor:12/40The end product doesn't work at all. They missed key points on the assignment (such as drawing up an API)Also, most of their group did not show up to the second session.Average:30/40The end product has major problems, and some o
Illinois Tech - CS - 115
/* # * cs115 * section3 * homework 2 * 7th September 2007 */package homework2; public class Homework { /* * @param args */ public static void main(String[] args) { / TODO Auto-generated method stub/ System.out.println(&quot;my name is #&quot;); System.out.prin
Illinois Tech - CS - 115
Find a set of instructions for operating an appliance that requires you to set the date and time, such as a DVD player, microwave oven, clock radio, or a computer. Identify the obvious objects in the instructions. Then identify which portions of this
Illinois Tech - CS - 115
08/31/2007 HOMEWORK CS115004*2.Find a set of instructions for operating an appliance that requires you to set the date and time, such as a DVD player, kitchen oven, clock radio, or a computer, identify the obvious objects in the instructions. The
Illinois Tech - CS - 115
/* * # * cs115 sec007 * Lab2 */ package lab2; public class CrissCross { public static void main(String[] args) { char star = '*'; char space = ' '; String string1 = &quot; * String string2 = &quot;* * * * * * * * &quot;; *&quot;;System.out.println(string2); System.out
Illinois Tech - CS - 115
public class JackBanner { /* * @param args */ public static void main(String[] args) { String jack0 = (&quot;Black Jack&quot;); String jack1 = (&quot;#&quot;); char someone = 'j'; String jays = &quot;j j j j j j j&quot;; &quot; &quot; &quot; &quot; System.out.println(jack0+&quot; &quot;+jack0+&quot; &quot;+jack0+&quot; &quot;+ja
Illinois Tech - CS - 115
package Collection; public class cds { private String artiste; private int numCds; / default constructor public cds() { artiste=&quot;Taylor Swift&quot;; numCds=1; } /constructor public cds(String newArtiste, int newNumCds) { artiste = newArtiste; numCds = new
Illinois Tech - CS - 115
No example poor lab for Lab 1 currently exists. None of the students that produced poor labs submitted them to blackboard's digital dropbox.?/15The Homework is poor; it is from the S.Pasari, and is poor because it does not go into detail, or eve