1 Convert this problem into our standard form: Minimize 3 x 1 + 4.5 x 2 – 6 x 3 subject to 1 x 1 - 2 x 2 – 3 x 3 ≥ 6.2 4 x 1 + 5 x 2 – 6 x 3 ≤ 5 7 x 1.

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Welcome to Navigation 101 Lesson 4: Exploring Careers.
Introduction to Programming
1 March 2013Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems
EXAMPLES (Arrays). Example Many engineering and scientific applications represent data as a 2-dimensional grid of values; say brightness of pixels in.
Introduction to Computer Science Robert Sedgewick and Kevin Wayne Recursive Factorial Demo pubic class Factorial {
TNPL JoongJin-Cho Runge-kutta’s method of order 4.
What is shape function ? shape function is a function that will give the displacements inside an element if its displacement at all the node locations.
Q1 Review. Other News US News top CS Universities global-universities/computer- science?int=994b08.
Graohics CSC 171 FALL 2001 LECTURE 16. History: COBOL Conference on Data System Languages (CODASYL) - led by Joe Wegstein of NBS developed the.
1 Calling within Static method /* We can call a non static method from a static method but by only through an object of that class. */ class Test1{ public.
Introduction to Programming Lecture 39. Copy Constructor.
Case study 1: Calculate the approximation of Pi
Datalogi A 1: 8/9. Book: Cay Horstmann: Big Java or Java Consepts.
General Computer Science for Engineers CISC 106 Lecture 26 Dr. John Cavazos Computer and Information Sciences 04/24/2009.
JAVA Control Structures: Repetition. Objectives Be able to use a loop to implement a repetitive algorithm Practice, Practice, Practice... Reinforce the.
Introduction to Programming Prof. Rommel Anthony Palomino Department of Computer Science and Information Technology Spring 2011.
Practical Electronics & Programming
Computer Science: A Structured Programming Approach Using C A Programming Example— Morse Code Morse code, patented by Samuel F. B. Morse in 1837,
Console Input. So far… All the inputs for our programs have been hard-coded in the main method or inputted using the dialog boxes of BlueJ It’s time to.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
CSci 111 – computer Science I Fall 2014 Cynthia Zickos WRITING A SIMPLE PROGRAM IN JAVA.
Lecture 13: 10/10/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Mixing integer and floating point numbers in an arithmetic operation.
ENG College of Engineering Engineering Education Innovation Center 1 Array Accessing and Strings in MATLAB Topics Covered: 1.Array addressing. 2.
CS110 Programming Language I Lab 4: Control Statements I Computer Science Department Spring 2014.
Computer Science 210 Computer Organization Control Circuits Decoders and Multiplexers.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Classes. Student class We are tasked with creating a class for objects that store data about students. We first want to consider what is needed for the.
Character Encoding & Handling doubles Pepper. Character encoding schemes EBCDIC – older with jumps in alphabet ASCII 1967 (7 bit)– Handled English, –ASCII.
Program Design. The design process How do you go about writing a program? –It’s like many other things in life Understand the problem to be solved Develop.
Using the while-statement to process data files. General procedure to access a data file General procedure in computer programming to read data from a.
A Simple Java Program //This program prints Welcome to Java! public class Welcome { public static void main(String[] args) { public static void main(String[]
Catie Welsh February 23,  Lab 4 due on Friday  Lab 5 will be assigned on Friday 2.
Week 5 - Wednesday.  What did we talk about last time?  Recursion  Definitions: base case, recursive case  Recursive methods in Java.
BHCSI Programming Contests. Three contests Mock Contest #1  Friday, July 16 th  2:15 – 4:45pm UCF High School Online Contest  Thursday, July 22 nd.
Review :chapters What is an algorithm? A step by step description of how to accomplish a task. For example, Adding 3 numbers N1, N2 and N3 Add.
CSC 445/545 is done at 4:30 so I did NOT fill in the box for 4:30 for our class. Please put your name here. Please put your as well. 1.
Lab 3. Why Compressed Row Storage –A sparse matrix has a lot of elements of value zero. –Using a two dimensional array to store a sparse matrix wastes.
Print Row Function void PrintRow(float x[ ][4],int i) { int j; for(j=0;j
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
CSE 143 Lecture 9 Recursion slides created by Alyssa Harding
CS 112 Introduction to Programming Nested Loops; Parameterized Methods Yang (Richard) Yang Computer Science Department Yale University 208A Watson, Phone:
1 A Case Study: Percolation Percolation. Pour liquid on top of some porous material. Will liquid reach the bottom? Applications. [ chemistry, materials.
2.4 A Case Study: Percolation Introduction to Programming in Java: An Interdisciplinary Approach · Robert Sedgewick and Kevin Wayne · Copyright © 2008.
Midterm 2 Review Notes on the CS 5 midterm Take-home exam due by 5:00 pm Sunday evening (11/14) Hand in your solutions under the door of my office, Olin.
 Problem Analysis  Coding  Debugging  Testing.
Input, Output and Variables GCSE Computer Science – Python.
Numbers How does computer understand numbers? Knows only two symbols
Introduction to programming in java
ECE 1304 Introduction to Electrical and Computer Engineering
Stat 261 Two phase method.
Lesson 1 - Sequencing.
using System; namespace Demo01 { class Program
Lecture Note Set 1 Thursday 12-May-05
Computer Programming Methodology File Input
Chapter 2.
Computing Adjusted Quiz Total Score
Recursion based on slides by Alyssa Harding
class PrintOnetoTen { public static void main(String args[]) {
PreAP Computer Science Review Quiz 08
Scope of variables class scopeofvars {
Matrix Addition
Labor Shift Scheduling Problem
9.3 Linear programming and 2 x 2 games : A geometric approach
CS Week 2 Jim Williams, PhD.
PROGRAMMING ASSIGNMENT I
Presentation transcript:

1 Convert this problem into our standard form: Minimize 3 x x 2 – 6 x 3 subject to 1 x x 2 – 3 x 3 ≥ x x 2 – 6 x 3 ≤ 5 7 x x 2 – 9 x 3 = -3 x 2, x 3 ≥ 0 How would this problem be input to your program?

Interested in meeting other people in your faculty from all different stages in their academic careers? Come join other eager students to make connections and discuss the involvement of women in Computer Science and Engineering. Or just come for cookies and tea! : Where: ECS 660 When: 2:30pm on Friday, September 14 Who: Everyone welcome! 2

3 Because the b column is special and the z row is special, I chose to place them in column 0 and row 0 in my matrix for the Simplex algorithm. If you do this, the second phase of the project will probably be a little bit easier to implement.

4 public class Repeat_Add public static void main(String [ ] args) { int i, next_print; float x, y; double error; x= 1.0f / 3; // x= 1/3 y=0; next_print=3;

5 for (i=1; i <= ; i++) { y= y+x; error= y- (double) i / 3 ; if (i == next_print) { System.out.println(y + " should be " + (i/3) + " Error = " + error); next_print= next_print * 10; }

6 Errors resulting from repeatedly adding 1/3 (edited to make this more readable). 1.0 should be 1 Error = should be 10 Error = E should be 100 Error = E should be 1000 Error = should be Error = should be Error = should be Error = The “error” would be zero if the mathematics was 100% precise. But it is not due to floating point errors. This is why we compare values to some small epsilon instead of zero to test if they are zero or not.

7 LP problems can be: 1. infeasible, 2. unbounded, or 3. they have at least one basic (corresponding to a dictionary) optimal solution.

8 Another sample problem: Maximize 5 x x x 3 subject to x x 2 + x 3 ≤ 3 -x x 3 ≤ 2 2 x 1 - x x 3 ≤ 4 2 x x 2 - x 3 ≤ 2 x 1, x 2, x 3 ≥ 0

9 The initial dictionary: X4 = X X X3 X5 = X X X3 X6 = X X X3 X7 = X X X z = X X X3 The program output will be in dictionary format.

10 X1 enters. X7 leaves. z = After 1 pivot: X4 = X X X7 X5 = X X X7 X6 = X X X7 X1 = X X X z = X X X7

11 X3 enters. X6 leaves. z = After 2 pivots: X4 = X X X7 X5 = X X X7 X3 = X X X7 X1 = X X X z = X X X7

12 X2 enters. X5 leaves. z = After 3 pivots: X4 = X X X7 X2 = X X X7 X3 = X X X7 X1 = X X X z = X X X7 How could we argue that this must be the optimal solution?