Online study resources available anywhere, at any time
High-quality Study Documents, expert Tutors and Flashcards
Everything you need to learn more effectively and succeed
We are not endorsed by this school |
We are sorry, there are no listings for the current search parameters.
School: UCSD
Course: Princ Computer Architecture
UCSD CSE240A Fall 2013 Homework 2 Solutions P1. - 5-stage pipeline - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 - 1 lw R3,100(R5) IF ID EX M_ |WB | \| | | 2 add R6,R3,R2 IF ID () |EX M WB | | | | 3 sub R9,R3,R8 IF () |ID EX_ M WB | | \ | 4
School: UCSD
School: UCSD
Course: Mathematics For Algorithm And Systems Analysis
CSE 21: Homework 2 October 5, 2009 Problem 1 Teams A and B play in baseballs world series. Here, the team that rst wins four games wins the series. (a) What is the number of ways the series can occur? (b) What is the number of ways the series can occur, g
School: UCSD
Course: Princ Computer Architecture
CSE240aFall2013Homework1,Due,Thursday,October10 Remembertotypeyourhwsolutions. Homework!should!be!typed.!Do!not!forget!to!put!your!name. (fromthebook)H&PA.7aA.8a,(below)P1,P2,P3,P4,P5,P6,P7 P1.ProgramAruns20billioninstructionsona2GHzprocessor,andachievesa
School: UCSD
Course: Algorithm Design And Analysis
CSE 202 Spring 2010 Solution Set 1 7 April 2010 Chapter 1, Problem 1: The statement is false, which is evident due to the following counterexample with 2 men (m1 and m2 ) and 2 women (w1 and w2 ). The preferences are as follows: m1 prefers w1 to w2 , m2 p
School: UCSD
Course: Intro. To Theory Of Computation
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 5 Instructor: Daniele Micciancio Due on: Wed. Nov 10, 2010 Problem 1 Let BIGGER be the set of all strings over the alphabet cfw_0, 1, > of the form x > y , where x and y are binary n
School: UCSD
Course: Introduction To Computer Architecture
Instruction Set Architecture What we learned Computer Architecture Review or CSE141's Greatest Hits ISA types ISA formats and tradeoffs addressing modes branch types MIPS ISA CSE 141 Dean Tullsen CSE 141 Dean Tullsen Instruction Set Arc
School: UCSD
Principles Review and Singleton 1 Overview Singleton Only one instance of one type Pattern Exercises Principles Review Modeling Exercises You need to be able to use the patterns we will do coding and modeling exercises 2 Singleton pattern singleton: a
School: UCSD
Advanced Cache Architectures Advanced Cache Architectures and Virtual Memory AMAT = Average Memory Access Time AMAT = hit time + miss rate*miss penalty As a result, then, there are several ways to improve performance (reduce AMAT): Decrease hit time
School: UCSD
The Big Picture: The Performance Perspective Processor design (datapath and control) will determine: Designing a Single Cycle Datapath Clock cycle time Clock cycles per instruction Starting today: Single cycle processor: Advantage: One clock cycle pe
School: UCSD
Parallel Architectures for Executing Multiple Threads Multiprocessors and Multithreading more is better? CSE 141 Dean Tullsen Multiprocessor multiple CPUs tightly coupled enough to cooperate on a single problem. Multithreaded processors (e.g., simultaneou
School: UCSD
The bottom line: Performance Car Dean Tullsen Passengers Throughput (pmph) 3.1 hours 160 mph 2 320 Greyhound 7.7 hours 65 mph 60 3900 Time to do the task execution time, response time, latency Tasks per day, hour, week, sec, ns. . throughput, bandwidt
School: UCSD
Course: Database Systems Principles
CSE 132A Assignment #1 (SQL) Solutions The boat reservations database has the following schema: sailor: sname (string), rating (integer) boat: bname (string), color (string), rating (integer) reservation: sname (string), bname (string), day (string) The r
School: UCSD
Course: Database Systems Principles
.mode columns .headers on create table movie (title, director, actor); create table schedule (theater, title); insert into movie values ('Last Tango', 'Bertolucci', 'Brando'); insert into movie values ('Last Tango', 'Bertolucci', 'Winger'); insert into mo
School: UCSD
Course: Theory Of Computation
CSE 105: Introduction to the Theory of Computation Winter 2014 Lecture Notes: A nonregular language Instructor: Daniele Micciancio UCSD CSE This lecture notes are provided as a supplement to the textbook. In the textbook you have read about the pumping le
School: UCSD
Course: Design & Analysis Of Algorithm
Design and Analysis of Algorithms: Course Notes Prepared by Samir Khuller Dept. of Computer Science University of Maryland College Park, MD 20742 samir@cs.umd.edu (301) 405 6765 August 14, 2003 Preface These are my lecture notes from CMSC 651: Design and
School: UCSD
Course: Design & Analysis Of Algorithm
Lecture Notes for Algorithm Analysis and Design Sandeep Sen1 November 6, 2013 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E-mail:ssen@cse.iitd.ernet.in Contents 1 Model and Analysis 1.1 Computing Fibonacci numbers
School: UCSD
Course: Design & Analysis Of Algorithm
CMSC 451 Design and Analysis of Computer Algorithms1 David M. Mount Department of Computer Science University of Maryland Fall 2003 1 Copyright, David M. Mount, 2004, Dept. of Computer Science, University of Maryland, College Park, MD, 20742. These lectur
School: UCSD
Course: Digital Design
Lecture 7: UML Class Diagrams CSE 111 01/08/11 Copyright W. Howden 1 Context After completion of the collaboration diagrams, we have identified class objects that will be needed to perform the subsystem responsibilities We now have the classes for our de
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Winter 2015 Program Assignment #3 (100 points) START EARLY! Due: 30 January 2014 at 1159pm (2359, Pacific Standard Time) PROGRAM #3 : ArrayPlay READ THE ENTIRE ASSIGNMENT BEFORE STARTING In lecture, we described several common operations that can b
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Winter 2015 Program Assignment #2 (100 points) START EARLY! Due: 23 January 2014 at 1159pm (2359, Pacific Standard Time) Exercises are ungraded and are not turned in Note that in all commands, the $ indicates the shell prompt. You do not type in th
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Winter 2015 Programming Assignment #1 START EARLY! 100 Pts Due: 16 January 2015 at 11:59pm (2359) (Pacific Standard Time) Covers Chapters: ZY 1-3 This is a combination of a programming assignment and ungraded exercises Exercises are optional, not g
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 17 and 18 Searching and Sorting CSE11 Winter 15 Searching for Things equals() If not overridden by a class definition Behaves just like = in a Boolean expression Compares if two references are identical If overridden, will determine if two differ
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE11 Lecture 14 Winter 2015 Java AWT/Swing Intro Graphical Programs in Java AWT and Swing Graphical Components Buttons, Menus (ComboBox), Sliders, Labels, Input Fields, Multi-line text Layout Managers What they (8 different ones!) are for and why How to
School: UCSD
School: UCSD
Course: Algorithms
Solutions are boxed in blue. Grading schemes are boxed in yellow UCSD CSE 101, Winter 2011 FINAL EXAM March 17, 2011 Name: Student ID: Please read all of the following information before starting the exam. You have three hours (180 minutes) to work the ex
School: UCSD
Course: Int Artif Intellsearch&reason
NAME:_ LOGIN:_ Signature:_ Computer Science and Engineering 150 Programming Languages for Artificial Intelligence Thursday, May 9, 2007 M I DT E RM E XAM DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO START! Please DO NOT put your name at the top of each pa
School: UCSD
Course: Algorithms
CSE 101 Midterm Name: February 7, 2013 Student ID: Question Points 1 10 2 10 3 10 4 10 Total: Score 40 INSTRUCTIONS: Be clear and concise. Write your answers in the space provided. Use the backs of pages, and/or the scratch page at the end, for your scrat
School: UCSD
Course: Princ Computer Architecture
UCSD CSE240A Fall 2013 Homework 2 Solutions P1. - 5-stage pipeline - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 - 1 lw R3,100(R5) IF ID EX M_ |WB | \| | | 2 add R6,R3,R2 IF ID () |EX M WB | | | | 3 sub R9,R3,R8 IF () |ID EX_ M WB | | \ | 4
School: UCSD
Course: Mathematics For Algorithm And Systems Analysis
CSE 21: Homework 2 October 5, 2009 Problem 1 Teams A and B play in baseballs world series. Here, the team that rst wins four games wins the series. (a) What is the number of ways the series can occur? (b) What is the number of ways the series can occur, g
School: UCSD
Course: Princ Computer Architecture
CSE240aFall2013Homework1,Due,Thursday,October10 Remembertotypeyourhwsolutions. Homework!should!be!typed.!Do!not!forget!to!put!your!name. (fromthebook)H&PA.7aA.8a,(below)P1,P2,P3,P4,P5,P6,P7 P1.ProgramAruns20billioninstructionsona2GHzprocessor,andachievesa
School: UCSD
Course: Intro. To Theory Of Computation
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 5 Instructor: Daniele Micciancio Due on: Wed. Nov 10, 2010 Problem 1 Let BIGGER be the set of all strings over the alphabet cfw_0, 1, > of the form x > y , where x and y are binary n
School: UCSD
Course: Mathematics For Algorithm And Systems Analysis
CSE 21: Homework 3 October 12, 2009 Problem 1 In how many ways can 6 people be assigned to 4 nonempty teams? Problem 2 An urn contains 5 red marbles and 6 white marbles. (a) How many ways can 4 marbles be drawn? (b) What if we must have 2 red marbles and
School: UCSD
Course: Design & Analysis Of Algorithm
Algorithms: CSE 101 Homework II Solve the following problems. Consult the style guide for writing solutions. Each problem is worth 10 points. Problem 1: Finding the k th Smallest Element You are given two sorted lists of size m and n. Give an O(log m + lo
School: UCSD
Course: Database Systems Principles
Here is a schema about battleships and the battles they fought in: Ships(name, yearLaunched, country, numGuns, gunSize, displacement) Battles(ship, battleName, result) A typical Ships tuple would be: ('New Jersey', 1943, 'USA', 9, 16, 46000) which means t
School: UCSD
Lab 2 Part 1: 2's complement Booth's Multiplication Build a 11-bit two's complement multiplier using Booth's algorithm. Part 2: Equivalence Checking Decide whether the function pairs are equivalent or not by implementing these functions and applyi
School: UCSD
Lab Assignment 4 Carry Look-ahead Adder/Subtractor and Hazard Free Design Due February 28, Thursday, 1:00pm Introduction: This lab assignment consists of two parts: (1) Implementation of a carry look-ahead excess-3 adder/subtractor, and (2) Hazard an
School: UCSD
Course: Intro Computer Science Java
public class Lab8c cfw_ public static void main(String [] args) cfw_ /* PART C * double [] grades = new double[3]; grades[0] = 4.0; grades[1] = 4.0; grades[2] = 3.0; Student student = new Student("Ryan Montgomery", grades, "Linguistics"); Syste
School: UCSD
Course: Intro Computer Science Java
public class Lab8c cfw_ public static void main(String [] args) cfw_ /* PART C * double [] grades = new double[3]; grades[0] = 4.0; grades[1] = 4.0; grades[2] = 3.0; Student student = new Student("Ryan Montgomery", grades, "Linguistics"); System.out.print
School: UCSD
Course: Intro Computer Science Java
public class Lab8a cfw_ public static void main(String [] args) cfw_ /* PART A * Student a = new Student(); System.out.println(a); Student b = new Student("Marshall Mathers"); System.out.println(b); double [] grades = new double[3]; grades[0]=
School: UCSD
Course: Programming Languages
86 3. Loops and Conditional Statements (x>1) & (x<2) | (x>=4) We could use the commands in a dierent form # a = and(x>1,x<2); b = (x>=4); c = or(a,b) " ! by making use of the and and or commands. Notice here we have actually set Boolean variables a, b and
School: UCSD
Course: Programming Languages
3.4 Conditional Statements 85 The only value which is less than (or equal to) one and greater than (or equal to) one is one itself. The answer is the single value one, written as cfw_1. 6. (x>2) This is our rst example of negation, which is read as x is n
School: UCSD
Course: Programming Languages
84 3. Loops and Conditional Statements NOT () This simply changes the state so (true)=false and (false)=true. We pause and just run through these logical operators: a AND b This is true if both a and b are true a OR b This is true if one of a and b is tru
School: UCSD
Course: Programming Languages
3.4 Conditional Statements 83 3.4 Conditional Statements MATLAB has a very rich vocabulary when it comes to conditional operations but we shall start with the one which is common to many programming languages (even though the syntax may vary slightly). Th
School: UCSD
Course: Programming Languages
82 3. Loops and Conditional Statements 3.3.4 Loops Within Loops (Nested) Many algorithms require us to use nested loops (loops within loops), as in the example of summing series on page 75. We illustrate this using a simple example of constructing an arra
School: UCSD
Course: Programming Languages
3.3 Summing Series 81 This kind of expression will prove to be very useful when we come to consider numerically evaluating integrals in a later chapter. Example 3.8 Evaluate the expression N 1+ n=1 2 n for N = 10 (the symbol means the product of the terms
School: UCSD
University of California, San Diego Department of Computer Science and Engineering CSE 3 Fluency with Information Technolgy Wtr 2014 Lecture: MWF noon-12:50pm WLH 2005 Instructor: Office: Office Hours: Email: Susan Marx EBU-3B Room 2206 (CSE bldg across f
School: UCSD
CSE21 - Mathematics for Algorithms and Systems Spring 2015 Syllabus Instructors: Teaching Assistants: Tutors: Russell Impagliazzo Janine Tiefenbruck Michelle Bodnar Mayank Dhiman Jiawei Gao Dmitriy Kunitskiy Shibu Lawrence Devin Platt Joseph Deon Sara Far
School: UCSD
Course: Theory Of Computation
CSE105:AutomataandComputabilityTheory Winter2015 Instructor:HovavShacham,hovav@cs.ucsd.edu Textbook:M.Sipser:IntroductiontotheTheoryofComputation,2nded. OptionalTextbook:T.Stuart:UnderstandingComputation OptionalTextbook:M.Lipovaa:LearnYouaHaskellforGreat
School: UCSD
University of California, San Diego Department of Computer Science and Engineering CSE 3 Fluency with Information Technolgy Wtr 2015 Lecture: Instructor: Office: MWF noon-12:50pm Center 115 Office Hours: Email: Email help: Web page: Susan Marx EBU-3B Room
School: UCSD
Syllabus - CSE 8A Fall 2014 10/4/14, 7:31 AM CSE 8A Fall 2014 Welcome to CSE 8A! Assignments, Labs and Schedule Search this site Slides and Resources Tutor Hours Syllabus Syllabus Welcome to CSE 8A! We are excited to have you in this course. In this class
School: UCSD
Course: Advanced Data Structures
CSE 100 Advanced data structures Data structures lay at the very core of effective software engineering. The use of an appropriate structure to solve the problem at hand is the true difference between a software engineer and a programmer/hacker. In the re
School: UCSD
Course: Princ Computer Architecture
UCSD CSE240A Fall 2013 Homework 2 Solutions P1. - 5-stage pipeline - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 - 1 lw R3,100(R5) IF ID EX M_ |WB | \| | | 2 add R6,R3,R2 IF ID () |EX M WB | | | | 3 sub R9,R3,R8 IF () |ID EX_ M WB | | \ | 4
School: UCSD
School: UCSD
Course: Mathematics For Algorithm And Systems Analysis
CSE 21: Homework 2 October 5, 2009 Problem 1 Teams A and B play in baseballs world series. Here, the team that rst wins four games wins the series. (a) What is the number of ways the series can occur? (b) What is the number of ways the series can occur, g
School: UCSD
Course: Princ Computer Architecture
CSE240aFall2013Homework1,Due,Thursday,October10 Remembertotypeyourhwsolutions. Homework!should!be!typed.!Do!not!forget!to!put!your!name. (fromthebook)H&PA.7aA.8a,(below)P1,P2,P3,P4,P5,P6,P7 P1.ProgramAruns20billioninstructionsona2GHzprocessor,andachievesa
School: UCSD
Course: Algorithm Design And Analysis
CSE 202 Spring 2010 Solution Set 1 7 April 2010 Chapter 1, Problem 1: The statement is false, which is evident due to the following counterexample with 2 men (m1 and m2 ) and 2 women (w1 and w2 ). The preferences are as follows: m1 prefers w1 to w2 , m2 p
School: UCSD
Course: Intro. To Theory Of Computation
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 5 Instructor: Daniele Micciancio Due on: Wed. Nov 10, 2010 Problem 1 Let BIGGER be the set of all strings over the alphabet cfw_0, 1, > of the form x > y , where x and y are binary n
School: UCSD
Course: Mathematics For Algorithm And Systems Analysis
CSE 21: Homework 3 October 12, 2009 Problem 1 In how many ways can 6 people be assigned to 4 nonempty teams? Problem 2 An urn contains 5 red marbles and 6 white marbles. (a) How many ways can 4 marbles be drawn? (b) What if we must have 2 red marbles and
School: UCSD
Course: Modern Cryptography
Computer Science and Engineering, UCSD CSE 207: Modern Cryptography Problem Set 8 Spring 11 Instructor: Mihir Bellare May 25, 2011 Problem Set 8 Due: Wednesday June 1, 2011, in class. Problem 1. [60 points] In an identity-based, non-interactive key distri
School: UCSD
Course: Digital Design
Lecture 7: UML Class Diagrams CSE 111 01/08/11 Copyright W. Howden 1 Context After completion of the collaboration diagrams, we have identified class objects that will be needed to perform the subsystem responsibilities We now have the classes for our de
School: UCSD
Course: Design & Analysis Of Algorithm
Algorithms: CSE 101 Homework II Solve the following problems. Consult the style guide for writing solutions. Each problem is worth 10 points. Problem 1: Finding the k th Smallest Element You are given two sorted lists of size m and n. Give an O(log m + lo
School: UCSD
Course: Princ Computer Architecture
CSE240AFall2013Homework2 Due:Tuesday10/22 Homeworkshouldbetyped. P1. An important design aspect of pipeline architecture is the number of pipeline stages. Your design team has a choice between the following two architectures: 1. A classic 5stage MIPS
School: UCSD
Course: Introduction To The Theory Of Comptuation
CSE 105: Introduction to the Theory of Comptuation Spring 2012 Solution Set 1 Instructor: Alexander Tsiatas Due on: Wed. April 11, 2012 Problem 1 There are many possibilities here. This is just one example. (a) Suppose you want a DFA that accepts strings
School: UCSD
Course: Algorithms
Solutions are boxed in blue. Grading schemes are boxed in yellow UCSD CSE 101, Winter 2011 FINAL EXAM March 17, 2011 Name: Student ID: Please read all of the following information before starting the exam. You have three hours (180 minutes) to work the ex
School: UCSD
Course: Artificial Intelligence
CSE 150. Assignment 6 Out: Thu Mar 07 Due: Thu Mar 14 Reading: Sutton & Barto, Chapters 1-4. 6.1 CAPE Survey You should have received an email from CAPE asking you to evaluate this course. Please complete the online survey if you have not already done so.
School: UCSD
Course: Int Artif Intellsearch&reason
NAME:_ LOGIN:_ Signature:_ Computer Science and Engineering 150 Programming Languages for Artificial Intelligence Thursday, May 9, 2007 M I DT E RM E XAM DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO START! Please DO NOT put your name at the top of each pa
School: UCSD
CSE 151: Introduction to Machine Learning Spring 2012 Problem Set 2 Due on: May 2, 2012 Instructor: Kamalika Chaudhuri Instructions This is a 20 point homework. Problems 1 and 2 are worth 5 points each; Problem 3 is worth 10 points. Problem 1 Draw ID3 de
School: UCSD
A LGORITHMS - CSE 101 Homework 2 Due Thursday, January 21st, 8:00 AM. No exceptions! Turn in solutions to problems 2.22 (page 75), 2.25 (page 76), and 2.30 (page 77). Each problem is worth 10 points. We suggest the following steps in writing up your solut
School: UCSD
Course: Intro Modern Cryptography
Computer Science and Engineering, UCSD CSE 107: Introduction to Modern Cryptography Problem Set 5 Solutions Fall 10 Instructor: Mihir Bellare November 8, 2010 Problem Set 5 Solutions Problem 1. [40 points] Let E : cfw_0, 1k cfw_0, 1l cfw_0, 1l be a secure
School: UCSD
Course: Algorithms
CSE 101 Midterm Name: February 7, 2013 Student ID: Question Points 1 10 2 10 3 10 4 10 Total: Score 40 INSTRUCTIONS: Be clear and concise. Write your answers in the space provided. Use the backs of pages, and/or the scratch page at the end, for your scrat
School: UCSD
Course: Database Systems Principles
Here is a schema about battleships and the battles they fought in: Ships(name, yearLaunched, country, numGuns, gunSize, displacement) Battles(ship, battleName, result) A typical Ships tuple would be: ('New Jersey', 1943, 'USA', 9, 16, 46000) which means t
School: UCSD
Course: Algorithms
CSE101 Midterm February 6, 2014 Name: _Student ID:_ Question 1 2 3 4 5 Total: Points 10 10 10 10 10 50 Score INSTRUCTIONS: Be clear and concise. Write your answers in the space provided. Use the backs of pages, and/or the scratch page at the end, for your
School: UCSD
Course: Introduction To Computer Architecture
Instruction Set Architecture What we learned Computer Architecture Review or CSE141's Greatest Hits ISA types ISA formats and tradeoffs addressing modes branch types MIPS ISA CSE 141 Dean Tullsen CSE 141 Dean Tullsen Instruction Set Arc
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 2 Due on: April 25 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
Course: Database Systems Principles
CSE 132A MIDTERM SOLUTIONS November 2014 TOTAL: 25 points Problem 1. True or false (no justication required): (i) If A is an attribute of type integer in a table, then A0 always evaluates to 0 in SQL. Circle one: False (when A is null) (ii) Aliases (tupl
School: UCSD
CSE120 Midterm Exam Fall 2010 Name:_ University of California, San Diego Department of Computer Science of Engineering Midterm Examination 1 CSE120 Operating System Principals Spring, 2011 9:30-10:50am, May 2nd Print your name and ID number neatly in the
School: UCSD
Course: Oper Systmsarchitc&implementn
NetID: CS411 Database Systems Fall 2008 Department of Computer Science University of Illinois at Urbana-Champaign Final Examination December 16, 2008 Time Limit: 180 minutes Print your name and NetID below. In addition, print your NetID in the upper righ
School: UCSD
Course: Advanced Algorithm
Homework Two, for Fri 10/12 CSE 101 When specifying an algorithm, please use pseudocode that is simple and unambiguous. Always justify the correctness and running time of the algorithm, unless these are obvious. 1. Here is yet another multiplication algor
School: UCSD
Course: Modern Cryptography
Computer Science and Engineering, UCSD CSE 207: Modern Cryptography Problem Set 4 Solutions Spring 11 Instructor: Mihir Bellare May 4, 2011 Problem Set 4 Solutions Problem 1. [30 points] Let E : cfw_0, 1k cfw_0, 1l cfw_0, 1l be a block cipher. Let D be th
School: UCSD
Course: Algorithms
For each edge e of G, we build a graph G' as follows: w(e) = -(|V| - 1) for each edge e' different from e, w(e') = 1 Run ZWC on G' If one run of ZWC returns YES, return YES for RC, otherwise NO. Proof: If a run of RWC returns YES, it means that we have
School: UCSD
Course: Intro Modern Cryptography
Computer Science and Engineering, UCSD CSE 107: Introduction to Modern Cryptography Problem Set 1 Solutions Fall 10 Instructor: Mihir Bellare October 4, 2010 Problem Set 1 Solutions Problem 2. [30 points] The ciphertext QFL HCVPS PX V ANSWLCEZK NCJVS; PQ
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 2 Due on: April 25 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
Course: Modern Cryptography
Computer Science and Engineering, UCSD CSE 207: Modern Cryptography Problem Set 5 Solutions Spring 11 Instructor: Mihir Bellare May 11, 2011 Problem Set 5 Solutions Problem 1. [50 points] Let G = g b e a cyclic group of order m, and let k = log2 (m) . The
School: UCSD
CSE 151: Introduction to Machine Learning Spring 2012 Problem Set 1 Due on: April 18, 2012 Instructor: Kamalika Chaudhuri Problem 1 Let u1 , . . . , uk be k vectors such that for each i, ui = 1, and ui , uj = 0 for all i = j . For any vector x, we dene P
School: UCSD
Course: Theory Of Computation
Theory of Computation - CSE 105 Half-Language Solution for Problem 1.42 Idea: Sine is regular, Let be a DFA recognizing . The idea for recognizing is the following: We are given a string and we need to check if there is a string of equal
School: UCSD
Midterm Examination #1 CSE 100 (practice) RULES: 1. Dont start the exam until the instructor says to. 2. This is a closed-book, closed-notes, no-calculator exam. Dont refer to any materials other than the exam itself. 3. Write your name, and your login na
School: UCSD
Course: Design & Analysis Of Algorithm
Algorithms: CSE 101 Homework I Problem 1: (Function Order) 2 Is the function 2lg n polynomially bounded? Is the function log log n ! polynomially bounded? Justify your answers Solution. bounded. The function 2lg 2 n is not polynomially bounded. The functi
School: UCSD
Course: Modern Cryptography
Computer Science and Engineering, UCSD CSE 207: Modern Cryptography Problem Set 1 Spring 11 Instructor: Mihir Bellare March 28, 2011 Problem Set 1 Due: Wednesday April 6, 2011, in class. Problem 1. [30 points] Let K be a 56-bit DES key, let L be a 64-bit
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 0 Due on: April 11 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 1 Due on: April 18 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
Course: A
CSE 250A. Assignment 1 Out: Tue Sep 28 Due: Tue Oct 05 1.1 Conditioning on background evidence [RN 13.9] It is often useful to consider the impact of specic events in the context of general background evidence, rather than in the absence of information. (
School: UCSD
Algorithms - CSE 202 Mathematical Preliminaries and Introductory Problems Writing Style: We suggest the following steps in writing up your solutions, when they are applicable. For a detailed writing style guidelines, please consult http:/cseweb.ucsd.edu/
School: UCSD
Course: Intro Modern Cryptography
Computer Science and Engineering, UCSD CSE 207: Modern Cryptography Problem Set 4 Solutions Fa12 Instructor: Mihir Bellare October 29, 2012 Problem Set 4 Solutions Problem 1. [30 points] Let E : cfw_0, 1k cfw_0, 1l cfw_0, 1l be a block cipher. Let D be th
School: UCSD
CSE 202 Homework 2 Solutions 1 Kleinberg & Tardos, problem 26, page 202. Time-varying Minimum Spanning Tree. Connected graph G = (V, E ). Each edge e E has a time-varying edge cost fe = ae t2 + be t + ce such that fe > 0 for all t. Denote n = |V | and
School: UCSD
Course: Intro. To Theory Of Computation
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 3 Instructor: Daniele Micciancio Due on: Wed. Oct. 20, 2010 Problem 1 Let L be the set of all strings (over the alphabet cfw_0, 1, +, =) of the form x + y = z , where x, y and z are
School: UCSD
Course: Introduction To The Theory Of Computation
CSE 105: Automata and Computability Theory Winter 2011 Homework #5 Due: Tuesday, March 1st, 2011 Problem 1 Let COMPLDFA be the language A, B A and B are DFAs over the same alphabet and L(A) = L(B ) . (Notice the complementation bar over L(B ) above!) Show
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 0 Due on: April 11 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
Course: Database Systems Principles
Homework 2 CSE 132A Due by noon on Monday, Dec. 8, by sliding under Alins oce door. Problem 2[20pts] Suppose that a B + tree index on (branch-name, branchcity) is available on relation branch. What would be the best way to handle the following selection?
School: UCSD
Course: Artificial Intelligence
CSE 150. Assignment 2 Out: Tue Jan 22 Due: Tue Jan 29 Reading: Russell & Norvig, Chapter 14; Korb & Nicholson, Chapter 2. 2.1 Probabilistic reasoning A patient is known to have contracted a rare disease which comes in two forms, represented by the values
School: UCSD
CSE 21 - Winter 2012 Homework #3 Homework 3 Solutions 3.1 In how many ways can a hand with 6 cards (from an ordinary deck of 52 cards) be made up of 3 pairs? (Note: a pair means two cards with the same value but different suits. We should assume that the
School: UCSD
Course: Intro. To Theory Of Computation
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 2 Instructor: Daniele Micciancio Due on: Wed. Oct 13, 2010 Guidelines: Same as for homework 1. Solutions to the homework should be submitted electronically using turnin, and you shou
School: UCSD
CSE 151: Introduction to Machine Learning Spring 2012 Problem Set 3 Instructor: Kamalika Chaudhuri Due on: May 17, 2012 Instructions This is a 20 point homework. Each problem is worth 5 points. Problem 4 is a programming assignment. For this problem, yo
School: UCSD
Course: Database Systems Principles
List at lowest All sailor.rating >= s.rating Need domain calculus for qbe cfw_s: name | for all s in sailor [s.rating >= t.rating] If no need for a, create some E a that is actor in movie(t,d,a) but you want t,d don't need a, just make a random a Create v
School: UCSD
Lab 2 Part 1: 2's complement Booth's Multiplication Build a 11-bit two's complement multiplier using Booth's algorithm. Part 2: Equivalence Checking Decide whether the function pairs are equivalent or not by implementing these functions and applyi
School: UCSD
Course: Intro. To Theory Of Computation
CSE105 Homework Number 1 SOLUTIONS October 6, 2010 Guidelines: solutions to the homework should be submitted electronically, following the instructions on the class website. As part of your solutions to this assignment you should submit: 1. A le with the
School: UCSD
Course: Modern Cryptography
Writing 4A The Critical Essay: Literature and the Arts Week 1 Sunday, July 17 Introductions/Class rules/ Plagiarism Contract/ Student and Teacher expectations Monday, July 18 Morning: Writing Diagnostic Read Alice Walker, Everyday Use Talk about story and
School: UCSD
Course: Intro Computer Science Java
Student ID _ cs8w _ Name _ Signature _ CSE 8A Final Winter 2011 Page 1 _ (13 points) Page 2 _ (14 points) Page 3 _ (16 points) Page 4 _ (20 points) Page 5 _ (8 points) Page 6 _ (19 points) Page 7 _ (24 points) Page 8 _ (15 points) Page 9 _ (20 points) Pag
School: UCSD
Lab Assignment 4 Carry Look-ahead Adder/Subtractor and Hazard Free Design Due February 28, Thursday, 1:00pm Introduction: This lab assignment consists of two parts: (1) Implementation of a carry look-ahead excess-3 adder/subtractor, and (2) Hazard an
School: UCSD
Course: Introduction To Computer Architecture
Instruction Set Architecture What we learned Computer Architecture Review or CSE141's Greatest Hits ISA types ISA formats and tradeoffs addressing modes branch types MIPS ISA CSE 141 Dean Tullsen CSE 141 Dean Tullsen Instruction Set Arc
School: UCSD
Principles Review and Singleton 1 Overview Singleton Only one instance of one type Pattern Exercises Principles Review Modeling Exercises You need to be able to use the patterns we will do coding and modeling exercises 2 Singleton pattern singleton: a
School: UCSD
Advanced Cache Architectures Advanced Cache Architectures and Virtual Memory AMAT = Average Memory Access Time AMAT = hit time + miss rate*miss penalty As a result, then, there are several ways to improve performance (reduce AMAT): Decrease hit time
School: UCSD
The Big Picture: The Performance Perspective Processor design (datapath and control) will determine: Designing a Single Cycle Datapath Clock cycle time Clock cycles per instruction Starting today: Single cycle processor: Advantage: One clock cycle pe
School: UCSD
Parallel Architectures for Executing Multiple Threads Multiprocessors and Multithreading more is better? CSE 141 Dean Tullsen Multiprocessor multiple CPUs tightly coupled enough to cooperate on a single problem. Multithreaded processors (e.g., simultaneou
School: UCSD
The bottom line: Performance Car Dean Tullsen Passengers Throughput (pmph) 3.1 hours 160 mph 2 320 Greyhound 7.7 hours 65 mph 60 3900 Time to do the task execution time, response time, latency Tasks per day, hour, week, sec, ns. . throughput, bandwidt
School: UCSD
What is Computer Architecture? CSE 141- Introduction to Computer Architecture Hardware Designer thinks about circuits, components, timing, functionality, ease of debugging Dean Tullsen construction engineer CSE 141 Dean Tullsen building architect Dean Tu
School: UCSD
Some things I am going to assume you know about numbers Twos complement number system (well go over quickly) Floating point formats (well go over quickly) Number Systems and Arithmetic or Computers go to elementary school CSE 141 Dean Tullsen CSE 141 Wh
School: UCSD
The Instruction Set Architecture Instruction Set Architecture Application or How to talk to computers Compiler Operating System Instr. Set Proc. I/O system Instruction Set Architecture Digital Design Circuit Design CSE 141 Dean Tullsen CSE 141 Dean Tullse
School: UCSD
Finally, telling the truth about Memory Up to this point, weve been assuming memory can be Memory Subsystem Design or Nothing Beats Cold, Hard Cache CSE 141 Dean Tullsen accessed in a single cycle. In fact, that was true once. But cycle time has decrease
School: UCSD
Exceptions, then Advanced Pipelining Exceptions or Oops! CSE 141 Dean Tullsen CSE 141 Exceptions Exceptions and Interrupts There are two sources of non-sequential control flow in a processor explicit branch and jump instructions exceptions the terminol
School: UCSD
Okay, then, what about those Control Signals? 0 M u x Add ALU result Add 4 Instruction [31 26] Control Logic for the Single-Cycle CPU PCSrc ALUSrc RegWrite PC Instruction [25 21] Read address Read register 1 Instruction [20 16] Instruction [310] or Whos i
School: UCSD
Branch Prediction program counter 1 0 1 1st iteration Branch Taken (predicted not taken) History -> 1 for (i=0;i<10;i+) cfw_ . . . . add $i, $i, #1 beq $i, #10, loop Branch Prediction program counter 1 1 1 2nd iteration Branch Taken (predicted taken) His
School: UCSD
Course: Data Structure
Midterm 2 Review Ryan, Zack, Kristiyan, Jeffery, Alok Goals of CSE 15L Team for weekly Labs: Topics 1. 2. 3. 4. 5. 6. 7. Git TDD & JUnit Makefile Unix Shell Scripting Ant & XML Java Logging API Profiling Git Git Things you should know What is git? What
School: UCSD
Course: Data Structure
CSE 12 Midterm Review Sheet Answers General Questions Command line arguments are arguments entered during the execution of a program on the command line. They generally configure how the program runs. An example: java ReverseArray declaration.txt The comm
School: UCSD
Course: Data Structure
CSE 12 Midterm Review Sheet Please note that some questions on this Midterm Review are harder than the actual test. This is because the review isnt just supposed to prepare you for the test, but to make sure youre faring well in class. The midterm will be
School: UCSD
Course: Data Structure
Name: _ PID:_ CSE 12 spring 2014 Week 7 Review Quiz Use self-paced polling to answer these questions with your clicker. In addition, circle your answers on this form and turn it in as a record of your answers in case there are any disputes about your answ
School: UCSD
Course: Data Structure
Name: _ PID:_ CSE 12 spring 2014 Week 4 Review Quiz Use self-paced polling to answer these questions with your clicker. In addition, circle your answers on this form and turn it in as a record of your answers in case there are any disputes about your answ
School: UCSD
Course: Data Structure
Name: _ PID:_ CSE 12 spring 2014 Week 5 Review Quiz Use self-paced polling to answer these questions with your clicker. In addition, circle your answers on this form and turn it in as a record of your answers in case there are any disputes about your answ
School: UCSD
Course: Data Structure
Name: _ PID:_ CSE 12 spring 2014 Week 3 Review Quiz Use self-paced polling to answer these questions with your clicker. In addition, circle your answers on this form and turn it in as a record of your answers in case there are any disputes about your answ
School: UCSD
Course: Data Structure
Name: _ PID:_ CSE 12 spring 2014 Week 2 Review Quiz Use self-paced polling to answer these questions with your clicker. In addition, circle your answers on this form and turn it in as a record of your answers in case there are any disputes about your answ
School: UCSD
Course: Data Structure
Name: _ PID:_ CSE 12 spring 2014 Week 6 Review Quiz Use self-paced polling to answer these questions with your clicker. In addition, circle your answers on this form and turn it in as a record of your answers in case there are any disputes about your answ
School: UCSD
Course: Programming Languages
albert herbert felix margaret john kim holly dana maya
School: UCSD
3 Fluency/Information Technology(4 units) LE A00 TuTh 12:30p - 1:50p CENTR 115 Kube, Paul Richard DI A01 TBA Kube, Paul Richard 620651 LA A50 F 3:00p - 4:50p EBU3B B270 Kube, Paul Richard 620652 LA A51 Th 3:00p - 4:50p EBU3
School: UCSD
Requirements, Specs, and UI Design CSE 112 Dedication to Tom Smykowski. Todays Agenda Requirements What are they? What is Requirements Analysis? Specs Why bother? Some Challenges Feature vs. Activity Planning Use Cases Demystified UI Design Some Wi
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101, Winter 2015 Lecture 1 Notes [January 6, 2015] Class URL: http:/vlsicad.ucsd.edu/courses/cse101-w15/ Notes January 6 (1) Monday and Wednesday discussion sections are equivalent. You can attend either. Attendance at discussion is strongly recommen
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101, Winter 2015 Lecture 3 Notes Class URL: http:/vlsicad.ucsd.edu/courses/cse101-w15/ Notes January 13 (1) TA OHs are posted Caught up on Piazza as of this morning (?) Discussion session slides from yesterday are posted: DAGs / topological sort, S
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101, Winter 2015 Lecture 4 Notes Class URL: http:/vlsicad.ucsd.edu/courses/cse101-w15/ Notes January 15 (1) Late HW policy: up to one day late, max 50% credit. After one day, solutions will be posted, so no turn-in beyond that point. My OH tomorrow
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101, Winter 2015 Lecture 2 Notes Class URL: http:/vlsicad.ucsd.edu/courses/cse101-w15/ Notes January 8 (1) WeBWorK Quiz #1: Open until Sunday night 11:59 PM with unlimited re-tries. Future quizzes: one try only (90 min). Followup for waitlist: Ive a
School: UCSD
Course: Database Systems Principles
CSE 132A Solutions to Practice Problems on Schema Design 1. We apply the lossless join test. position is: A a a The tableau corresponding to the decomB b b b C c c c D d d After chasing this with respect to F = cfw_B A, C B the last row becomes < a, b, c,
School: UCSD
Course: Database Systems Principles
Join minimization examples Let R be a relation over attributes ABC. (i) Simplify the following conjunctive SQL query, knowing that it is applied only to relations R satisfying the set of FDs F = cfw_AC B, B C, C A (use pattern minimization and the chase):
School: UCSD
Course: Database Systems Principles
How expressive is SQL? Full programming languages can express all computable functions (C, Java, etc) Can SQL express all computable queries? A: YES B: NO How expressive is SQL? flight from to SD LA SD ORD LA NY . Can SQL express the following query: Is t
School: UCSD
Course: Database Systems Principles
Relational Database Design Finding database schemas with good properties Example: Database for information on suppliers, parts supplied, and shipments Information consists of: S#: supplier number SNAME: supplier name SCITY: supplier city P#: part numb
School: UCSD
Course: Database Systems Principles
CSE 132A Database Systems Principles Prof. Victor Vianu 1 Data Management An evolving, expanding field: Classical stand-alone databases (Oracle, DB2, SQL Server) Computer science is becoming data-centric: web knowledge harvesting, crowd sourcing, cloud
School: UCSD
Course: Database Systems Principles
Whatwecoveredinthiscourse Coredatabasetopics 1. 2. 3. 4. Therelationalmodel SQLandtuplecalculus Recursivequeries Basicqueryprocessing relationalalgebra SQLjoinminimization 6. SchemadesignwithFDs 7. Concurrencycontrol Whatwedidntcover Coredatabasetopics 1.
School: UCSD
Course: Database Systems Principles
CSE 132A Practice Problems on Relational Algebra 1. The beer drinkers database consists of the following three relations frequents drinker bar serves bar beer likes drinker The rst indicates the bars each drinker frequents, the second tells what beers eac
School: UCSD
Course: Introduction To Computer Architecture
Multiprocessors and Multithreading Jason Mars Sunday, March 3, 13 Parallel Architectures for Executing Multiple Threads Sunday, March 3, 13 Parallel Architectures for Executing Multiple Threads Multiprocessor multiple CPUs tightly coupled enough to coope
School: UCSD
Course: Introduction To Computer Architecture
Data Hazards ADD SUB AND OR XOR Pipeline Hazards or Danger!Danger!Danger! CSE 240A R1, R2, R3 R4, R5, R1 R6, R1, R7 R8, R1, R9 R10, R1, R11 Data _ may result in data _. Dean Tullsen CSE 240A Data Hazards Dean Tullsen Data Hazard sub R7, R6, R3 add R6, R3,
School: UCSD
Course: Introduction To Computer Architecture
Compiler support for ILP: Software Pipelining Exposing More ILP These techniques were originally motivated by VLIW, which needs tons of ILP to work at all b useful for hi h d f k ll but f lf superscalar/dynamic/speculative processors, as well. Software Te
School: UCSD
Course: Introduction To Computer Architecture
Revisiting Branch Hazard Solutions Predict Not Taken IF EX MEM WB ID EX MEM WB IF ID EX MEM WB IF I+1 ID IF Branch Stall Predict Not Taken Predict Taken Branch Delay Slot ID EX MEM MEM WB I+2 I+3 Branch IF ID IF I+1 EX (bubble) (bubble) (bubble) (bubble)
School: UCSD
Course: Introduction To Computer Architecture
Memory Subsystem Design Jason Mars Monday, March 11, 13 The Memory Subsystem Computer Control Input Memory Datapath Monday, March 11, 13 Output Memory Locality Monday, March 11, 13 Memory Locality Memory hierarchies take advantage of memory locality. Mon
School: UCSD
Course: Introduction To Computer Architecture
HW support for More ILP Hardware Speculative Execution Speculation: allow an instruction to issue that is dependent on branch, without any consequences (including exceptions) if branch is predicted incorrectly (HW undo) Often combined with dynamic schedul
School: UCSD
Course: Introduction To Computer Architecture
Multi Cycle CPU Jason Mars Monday, February 4, 13 Why a Multiple Cycle CPU? Monday, February 4, 13 Why a Multiple Cycle CPU? The problem => single-cycle cpu has a cycle time long enough to complete the longest instruction in the machine Monday, February
School: UCSD
Course: Introduction To Computer Architecture
Dynamic Scheduling (or out-of-order execution) Instruction storage added to each functional execution unit Instructions issue to FU when no structural hazards, begin execution when dependences satisfied. Thus, instructions issued to different FUs can ex
School: UCSD
Course: Introduction To Computer Architecture
What is ILP? Instruction Level Parallelism (ILP) or Declaration of Independence CSE 240A The characteristic of a program that certain instructions are independent, and can potentially be executed i parallel. i d d d i ll b d in ll l Any mechanism that cre
School: UCSD
Course: Introduction To Computer Architecture
Instruction Set Architecture Jason Mars Sunday, January 13, 13 Instruction Set Architecture The agreed-upon interface between all the software that runs on the machine and the hardware that executes it. Application Operating System Compiler Instr. Set Pr
School: UCSD
Course: Introduction To Computer Architecture
Pipelined CPU Jason Mars Thursday, February 14, 13 Evolution of Our CPU: Single Cycle Thursday, February 14, 13 Evolution of Our CPU: Multi Cycle Thursday, February 14, 13 Instruction Latencies and Throughput Thursday, February 14, 13 Instruction Latencie
School: UCSD
Course: Introduction To Computer Architecture
Reasoning about Computer Performance Jason Mars Tuesday, January 22, 13 What Do We Want in our Computers Frame rate Responsiveness Real-time Throughput Latency/Execution time Battery life Low power/low temperature Tuesday, January 22, 13 What Do We
School: UCSD
Course: Design & Analysis Of Algorithm
Discussion Week 2 Douglas Chan January 21, 2015 1 Review Concepts It may be helpful to review geometric series. Remember that n1 a xk = a k=0 1 xk 1x where a is some constant. In homework 1c), the total number of nodes in a d-ary tree of height h is a ge
School: UCSD
Course: Design & Analysis Of Algorithm
Discussion Notes Wednesday, Jan 7th 2015 1 Big-Oh Fact 1. The two denitions of Big-Oh are equivalent Proof. We will that one can go from the rst denition to the second denition and vice versa, thereby establishing the equivalence of the two denitions. 1st
School: UCSD
Course: Computability And Complexity
CSE 200 Computability and Complexity Wednesday, May 15, 2013 Lecture 14: Randomized Computation (cont.) Instructor: Professor Shachar Lovett 1 Scribe: Dongcai Shen Randmized Algorithm Examples 1.1 The k-th Element Denition 1 (The k-th element) def Input:
School: UCSD
Course: Computability And Complexity
CSE 200 Computability and Complexity Monday, May 20, 2013 Lecture 15: Randomized Computation (cont.) Instructor: Professor Shachar Lovett 1 Scribe: Dongcai Shen Random Walk Algorithms for k-SAT 1.1 A random walk algorithm for 2-SAT 2-SAT. (x) = (x1 x2 ) (
School: UCSD
Course: Database Systems Principles
CSE 132A Assignment #1 (SQL) Solutions The boat reservations database has the following schema: sailor: sname (string), rating (integer) boat: bname (string), color (string), rating (integer) reservation: sname (string), bname (string), day (string) The r
School: UCSD
Course: Database Systems Principles
.mode columns .headers on create table movie (title, director, actor); create table schedule (theater, title); insert into movie values ('Last Tango', 'Bertolucci', 'Brando'); insert into movie values ('Last Tango', 'Bertolucci', 'Winger'); insert into mo
School: UCSD
Course: Theory Of Computation
CSE 105: Introduction to the Theory of Computation Winter 2014 Lecture Notes: A nonregular language Instructor: Daniele Micciancio UCSD CSE This lecture notes are provided as a supplement to the textbook. In the textbook you have read about the pumping le
School: UCSD
Course: Design & Analysis Of Algorithm
Design and Analysis of Algorithms: Course Notes Prepared by Samir Khuller Dept. of Computer Science University of Maryland College Park, MD 20742 samir@cs.umd.edu (301) 405 6765 August 14, 2003 Preface These are my lecture notes from CMSC 651: Design and
School: UCSD
Course: Design & Analysis Of Algorithm
Lecture Notes for Algorithm Analysis and Design Sandeep Sen1 November 6, 2013 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E-mail:ssen@cse.iitd.ernet.in Contents 1 Model and Analysis 1.1 Computing Fibonacci numbers
School: UCSD
Course: Design & Analysis Of Algorithm
CMSC 451 Design and Analysis of Computer Algorithms1 David M. Mount Department of Computer Science University of Maryland Fall 2003 1 Copyright, David M. Mount, 2004, Dept. of Computer Science, University of Maryland, College Park, MD, 20742. These lectur
School: UCSD
Course: Design & Analysis Of Algorithm
Some introductory notes on Design and Analysis of Algorithms Venkatesh Raman The Institute of Mathematical Sciences C. I. T. Campus Chennai - 600 113. email: vraman@imsc.res.in 1 Introduction to Algorithm Design and Analysis 1.1 Introduction An algorithm
School: UCSD
Course: Digital Design
Lecture 7: UML Class Diagrams CSE 111 01/08/11 Copyright W. Howden 1 Context After completion of the collaboration diagrams, we have identified class objects that will be needed to perform the subsystem responsibilities We now have the classes for our de
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Winter 2015 Program Assignment #3 (100 points) START EARLY! Due: 30 January 2014 at 1159pm (2359, Pacific Standard Time) PROGRAM #3 : ArrayPlay READ THE ENTIRE ASSIGNMENT BEFORE STARTING In lecture, we described several common operations that can b
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Winter 2015 Program Assignment #2 (100 points) START EARLY! Due: 23 January 2014 at 1159pm (2359, Pacific Standard Time) Exercises are ungraded and are not turned in Note that in all commands, the $ indicates the shell prompt. You do not type in th
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Winter 2015 Programming Assignment #1 START EARLY! 100 Pts Due: 16 January 2015 at 11:59pm (2359) (Pacific Standard Time) Covers Chapters: ZY 1-3 This is a combination of a programming assignment and ungraded exercises Exercises are optional, not g
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 17 and 18 Searching and Sorting CSE11 Winter 15 Searching for Things equals() If not overridden by a class definition Behaves just like = in a Boolean expression Compares if two references are identical If overridden, will determine if two differ
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE11 Lecture 14 Winter 2015 Java AWT/Swing Intro Graphical Programs in Java AWT and Swing Graphical Components Buttons, Menus (ComboBox), Sliders, Labels, Input Fields, Multi-line text Layout Managers What they (8 different ones!) are for and why How to
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 12 Programming Exceptions CSE11 Winter 2015 When Things go Wrong We've seen a number of run time errors: Array Index out of Bounds e.g., Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 at TestWNS.main(TestWNS.java:14) String
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE11 Lecture 16 Winter 2015 Recursion Recursion recursion: The definition of an operation in terms of itself. Solving a problem using recursion depends on solving smaller or simpler occurrences of the same problem. recursive programming: Writing methods
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 18 CSE11 Fall 2013 Inheritance A Common Error on PR3 while ( true ) cfw_ Scanner scnr = new Scanner(System.in); String s = scnr.nextLine(); We are not taking off any points for this error in PR3, will take off points in PR4 Scanner scnr = new Sca
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE11 Winter 2015 Lecture 1 Who Am I? UCSD Undergrad 1981-1985, Revelle UCSB, PhD, Electrical Engineering, 1993 Current Chief Technology Officer, San Diego Supercomputer Center Areas of Interest Large-scale Cluster Computing High-speed Networking High-
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 9 Cse11 Winter 2015 Streams, Files, File IO, Command-line Arguments, Files and Streams The File System Store Java classes, programs Store pictures, music, videos Can also use files to store program I/O A stream is a flow of input or output data Ch
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 11 Revisiting Visibility, Abstract Classes and Interfaces Revisit Classes and Instances Class X Instance of Class X Instance of Class X Variables (aka Fields) <type> var1 <type> var2 var1 var2 var1 var2 Methods method1() method2() static method3()
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 15 cse11 Winter 2015 Keyboard Listeners, Painting Graphics, Solving race conditions using the synchronized modifier Keyboard Input - Console Standard Input (System.in) is buffered A program may or may not see keystrokes immediately Java interac
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 13 Generics, Concurrency CSE11 Winter 2015 Generic Classes A generic class is defined with the following format: class name<T1, T2, ., Tn> cfw_ The type parameter section, delimited by angle brackets (<>), follows the class name. It specifies
School: UCSD
Modeling the Solution with Pattern Composition Modeling Reality: Clusters, Galaxies and Constellations NASA's Fermi Telescope Finds Giant Structure in our Galaxy Artwork Credit: NASA, and M. Weiss (Chandra X -ray Center) 1 Overview UML: Domain Modeling a
School: UCSD
More Patterns 1 Overview We need to learn a few more patterns before the end of class Today we will go over Enterprise Component Additional Details Composite Pattern Decorator and Adapter Next week we will go over MVC Singleton Modeling Exercises
School: UCSD
Advanced Modeling Compound patterns and Pattern Languages artist's illustration: turbulent winds of gas swirl around a black hole. Some of the gas is spiraling inward toward the black hole, but another part is blown away. Artwork Credit: NASA, and M. Weis
School: UCSD
Understanding Patterns 1 Overview From now on we will focus on understanding patterns Next week we will go over MVC Singleton Modeling Exercises You need to be able to use the patterns we will do coding and modeling exercises 2 Composite Pattern Class
School: UCSD
Mediator and Factory Making the Concrete Abstract 1 Principles 2 SRP, OCP, DIP, and DRY Principles The Single Responsibility Principle (SRP) Each class should be responsible for one thing Easy to violate, we start with few classes Classes should be op
School: UCSD
Design by Variation The changes to design and code : Refactoring 1 Variations Design for change, but dont invent solutions to problems that do not yet exist Customers Types What are the types of customers? Normal, Silver, Platinum Processes What are
School: UCSD
Depending only on interfaces Is that possible? Dependency Inversion Principle (DIP) Code to interfaces not implementations 1 We have a problem If you have classes that must depend only on interfaces they cant use new! Our solution is the Factory pattern!
School: UCSD
The Observer Pattern Event-driven design will set you free 1 Event-Driven Software Rules Whats an event? Its a kind of broadcast message that can be heard by any object that chooses to listen A typical event message from an object is I changed! This e
School: UCSD
Advanced OOD and the Strategy Pattern 1 The Project If you implement your project using only a Java Console Application, you can still get full credit for your project. In this course you are learning and will be assessed on Software Engineering lifecycle
School: UCSD
User Stories to Tasks Taking an Iteration Down to Code 1 User Stories to Tasks Breaking up the work and keeping track 2 User Stories are hard to take to code In customer language Features Big, multi-skilled Answer is to subdivide Stories into Tasks. Task
School: UCSD
Project Planning Planning for Success (aka Avoiding Failure) 1 Project Planning You have to have a plan to know that youve fallen off the plan 2 Goals of Project Planning Plan to deliver working product on budget on time 1. Staffing of project to move a
School: UCSD
Gathering Requirements We even iterate on the requirements 1 Recap Why do we need to follow a process to develop software? A: B: C: D: E: 2 Program vs. Product What we have! A Program A Programming System What we need! Interfaces system integration A Prog
School: UCSD
Patterns Introduction 1 Sapana Mehta (CS6V81) Design Patterns A pattern is a proven solution to a problem in a context. Christopher Alexander says each pattern is a three-part rule which expresses a relation between a certain context, a problem, and a s
School: UCSD
Welcome to CSE 110 Software Engineering A view from the research university Professor Massimiliano Menarini mmenarini@ucsd.edu Office hour Tuesday 5-6pm Room: CSE 3130 You can call me Max 1 CSE110 Team Other CSE 110 lecture taught by Prof. Ali Arsanjani B
School: UCSD
Great Software Development (through the research university A view from iteration) Pleasing the Customer 1 Learning Requires Your Effort I cant do the learning for you Learning = brain development Its like muscle development! Strenuous, repeated effort N
School: UCSD
From Requirements to Architecture We have requirements now what? 1 Requirement to User Stories: ambiguity and refinement Sign up Retail Customer for an account Securely login to account Add a service Delete a service Add a package Add service to pac
School: UCSD
From Requirements to Architecture We have requirements now what? 1 Modeling the Domain during an interview with the client Requirements elicitation (gathering requirements) during an interview is key, to create a preliminary domain model , play it back
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE140: Components and Design Techniques for Digital Systems Tajana Simunic Rosing 1 Sources: TSR, Katz, Boriello & Vahid Where we are now. What we covered last time: Boolean algebra What well do next: Logic representations SOP and POS K-maps Algorithm
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE140: Components and Design Techniques for Digital Systems Boolean algebra Tajana Simunic Rosing Where we are now. What weve covered: Number representations Switches, MOS transistors, Logic gates Universal gates Examples of logic function representatio
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE140: Components and Design Techniques for Digital Systems Logic Simplification with K-maps Tajana Simunic Rosing 25 Sources: TSR, Katz, Boriello & Vahid Sources: Katz, Boriello & Vahid Where we are now. What we covered last time: Logic representation
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE140: Components and Design Techniques for Digital Systems Introduction Prof. Tajana Simunic Rosing Lets get started! What well do today Analog vs. Digital Binary, Hexadecimal, Octal Switches, MOS transistors, Logic gates What comes next: Boolean
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE140: Components and Design Techniques for Digital Systems Tajana Simunic Rosing 1 Sources: TSR, Katz, Boriello & Vahid Where we are now. What we covered last time: Boolean algebra What well do next: Logic representations SOP and POS K-maps Algorithm
School: UCSD
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 4 April 8th, 2015 Todays
School: UCSD
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 1 March 30th, 2015 Todays
School: UCSD
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 3 April 6th, 2015 Todays
School: UCSD
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 2 April 1st, 2015 Todays
School: UCSD
Searching Russell Impagliazzo and Janine Tiefenbruck April 3, 2015 Last Time We reviewed some sorting algorithms that your classmates used to alphabetize their names. Selection Sort (Min Sort) Bubble Sort Insertion Sort Today's Agenda We will investigate
School: UCSD
Asymptotic Analysis : What and How Russell Impagliazzo and Janine Tiefenbruck April 6, 2015 Todays agenda 1 Dene symbols used for asymptotic analysis (aka, order). 2 Show techniques for comparing orders of functions. 3 Apply asymptotic analysis to the tim
School: UCSD
Sorting Algorithms Russell Impagliazzo and Janine Tiefenbruck April 1, 2015 Why sort? Imagine you are a TA and you have to input 400 exam scores into Ted, where the students are listed in alphabetical order. Or you work at a doctor's office and need to qu
School: UCSD
School: UCSD
Course: Algorithms
Solutions are boxed in blue. Grading schemes are boxed in yellow UCSD CSE 101, Winter 2011 FINAL EXAM March 17, 2011 Name: Student ID: Please read all of the following information before starting the exam. You have three hours (180 minutes) to work the ex
School: UCSD
Course: Int Artif Intellsearch&reason
NAME:_ LOGIN:_ Signature:_ Computer Science and Engineering 150 Programming Languages for Artificial Intelligence Thursday, May 9, 2007 M I DT E RM E XAM DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO START! Please DO NOT put your name at the top of each pa
School: UCSD
Course: Algorithms
CSE 101 Midterm Name: February 7, 2013 Student ID: Question Points 1 10 2 10 3 10 4 10 Total: Score 40 INSTRUCTIONS: Be clear and concise. Write your answers in the space provided. Use the backs of pages, and/or the scratch page at the end, for your scrat
School: UCSD
Course: Algorithms
CSE101 Midterm February 6, 2014 Name: _Student ID:_ Question 1 2 3 4 5 Total: Points 10 10 10 10 10 50 Score INSTRUCTIONS: Be clear and concise. Write your answers in the space provided. Use the backs of pages, and/or the scratch page at the end, for your
School: UCSD
CSE120 Midterm Exam Fall 2010 Name:_ University of California, San Diego Department of Computer Science of Engineering Midterm Examination 1 CSE120 Operating System Principals Spring, 2011 9:30-10:50am, May 2nd Print your name and ID number neatly in the
School: UCSD
Course: Oper Systmsarchitc&implementn
NetID: CS411 Database Systems Fall 2008 Department of Computer Science University of Illinois at Urbana-Champaign Final Examination December 16, 2008 Time Limit: 180 minutes Print your name and NetID below. In addition, print your NetID in the upper righ
School: UCSD
Course: Algorithms
For each edge e of G, we build a graph G' as follows: w(e) = -(|V| - 1) for each edge e' different from e, w(e') = 1 Run ZWC on G' If one run of ZWC returns YES, return YES for RC, otherwise NO. Proof: If a run of RWC returns YES, it means that we have
School: UCSD
Midterm Examination #1 CSE 100 (practice) RULES: 1. Dont start the exam until the instructor says to. 2. This is a closed-book, closed-notes, no-calculator exam. Dont refer to any materials other than the exam itself. 3. Write your name, and your login na
School: UCSD
School: UCSD
Course: Intro Computer Science Java
Student ID _ cs8w _ Name _ Signature _ CSE 8A Final Winter 2011 Page 1 _ (13 points) Page 2 _ (14 points) Page 3 _ (16 points) Page 4 _ (20 points) Page 5 _ (8 points) Page 6 _ (19 points) Page 7 _ (24 points) Page 8 _ (15 points) Page 9 _ (20 points) Pag
School: UCSD
MVC and Parting Words 1 Announcements Please fill the CAPEs Add any suggestion on how to improve the class It wont help you but it will help you colleagues next quarter Final is here in Solis 107 Tuesday 3-6pm Bring pen, ID No notes, cheat sheets, or
School: UCSD
Test Driven Development (TDD) 1 Strategy is nice but we have another problem You have classes that have dependencies on components whose concrete type is specified at design time. For example, lets assume that in the strategy pattern the algorithm user
School: UCSD
Head First Software Development Chapter 1 Reading Quizzes A view from the research university Prepare your clickers Clicker frequency CA 1 Reading Quiz 1(Clicker) According to Chapter 1 in HFSD, which of the following are positive qualities of Iteration
School: UCSD
Course: Design & Analysis Of Algorithm
Question 1 (Minimum Spanning Tree, 15 points). Compute the minimum spanning tree of the following graph. 8 7 13 3 9 1 2 4 10 5 6 12 11 The minimum spanning tree is given below: 8 7 13 3 9 1 2 4 10 5 6 12 11 We can obtain this with Kruskals algorithm. The
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 Exam 3 Solutions Winter 2015 Question 1 (Human Code, 30 points). Consider a text with the following letter frequencies: A appears 5 times B appears 6 times C appears 20 times D appears 8 times E appears 15 times F appears 2 times Find the Hu
School: UCSD
Course: Components And Design Techniques For Digital Systems
Quiz #1 No books, no notes no electronics except for clicker Question #1: 1min Convert the following hexadecimal number into a binary number: FE21F1 A. 2378 B. 1111 1110 0010 0001 1111 0001 C. 1111 1110 0010 1111 D. 1111 1110 0010 0001 1111 1111 E. None o
School: UCSD
V1 Circle CSE 8AL time: 9am 10am 12pm 2pm 3pm 4pm 5pm CSE 8A In-term exam 3 th Thursday, November 7 , 2013 Name_ PID_ 1. (4pts) This code
School: UCSD
Course: Software Tools&techniques Lab
Shell Syntax Instead of using braces cfw_ to control logic flow and statement blocks, shell uses terminating words: if, then/ fi for i in cfw_1.10 case / esac do for, do, done if [ $[i % 2] = 1 ]; then while, do, done echo $i is odd else echo $i is ev
School: UCSD
Problem8.PredicateQuantifiers B t ri s 1a dv r es meh r. ohv s n n aet e o v 2 h a ee () ,[ x () Jx Kx] a J ) Kx] [ () () x ( () ,[Jx Kx] [ x () b () () () Kx] x J Problem9.ExtraCredit B t ri s 1a dv r es meh r. ohv s n n aet e o v 2 h a ee #n ne u
School: UCSD
Course: Database Systems Principles
CSE 132A Homework# 1 Winter, 2015 Due Jan. 29 (see instructions below) This is an individual assignment. The usual criteria of academic integrity apply. We will use the database schema from the SQL assignment: sailor boat sname bname reservation rating co
School: UCSD
Course: Database Systems Principles
CSE 132A Homework# 2 Winter, 2015 Due on Tuesday, March 10 (in class and pdf le, see instructions) This is an individual assignment 1. Let R be a relation with attributes ABCD. Consider the SQL conjunctive query select z.D from R x, R y, R z where y.C = 0
School: UCSD
Course: Database Systems Principles
Relational db: the origins Frege: FO logic Tarski: algebra for FO Codd: relational databases Relational Calculus (aka FO) Models data manipulation core of SQL idea: specify what not how General form cfw_t | property (t) property (t) is described by a
School: UCSD
Course: Database Systems Principles
CSE 132A MIDTERM SOLUTIONS February 2015 TOTAL: 30 points Problem 1 (5 points) True or false (no justication required): (i) If A is an attribute of type integer in a table, then A0 always evaluates to 0 in SQL. Circle one: False (think of nulls) (ii) Ali
School: UCSD
Course: Database Systems Principles
Journey of a Query SQL select from where Relational Algebra 13(PQ) Query Rewriting 14(PS) Q R Query Execution Plan 14 Q Execution R P S Physical Level 69 Relational Algebra Simple set of algebraic operations on relations We use set semantics (no duplic
School: UCSD
Course: Database Systems Principles
Relational Database Design Finding database schemas with good properties Example: Database for information on suppliers, parts supplied, and shipments Information consists of: S#: supplier number SNAME: supplier name SCITY: supplier city P#: part numb
School: UCSD
Course: Design & Analysis Of Algorithm
Question 1 (Computing Runtime, 30 points). Consider the following sorting algorithm: RecursiveSort(A,i,j) \ sorts the elements of A between indices i and j if j=i+1 if A[i]>A[j] swap(A[i],A[j]) else Set k = ceiling(2*(j-i+1)/3)-1 RecursiveSort(A,i,i+k) Re
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 Exam 2 Winter 2015 Instructions: Do not open until the exam starts. The exam will run for 45 minutes. The problems are roughly sorted in increasing order of diculty. Answer all questions completely. You are free to make use of any result in the te
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 Exam 1 Solutions Winter 2015 Question 1 (Connected Components, 30 points). Identify the labels of the vertices in the strongly connected components of the graph below. B A C E D H I F G J The components are cfw_A, C, E, F , cfw_B, D, G, H, I, cfw_
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 Exam 1 Winter 2015 Instructions: Do not open until the exam starts. The exam will run for 45 minutes. The problems are roughly sorted in increasing order of diculty. Answer all questions completely. You are free to make use of any result in the te
School: UCSD
CSE 105: Midterm May 9, 2006 No books, no calculators. One 8.5x11 page of handwritten notes. Name: _ Student ID:_ Problem Score 1 2 3 4 Total 1 1. 30 pts. Prove the following languages (all with input alphabet cfw_0, 1) are regular or not. (a) Non-empty s
School: UCSD
CSE 105: Midterm Solution October 31, 2006 No books, no calculators. One 8.5x11 page of handwritten notes. Name: _ Student ID:_ ieng6.ucsd.edu login: _ Problem 1 2 3 4 5 6 Total Score /15 /15 /15 /15 /15 /15 /90 1 1. 15 pts. Determine whether regular lang
School: UCSD
CSE 105: Midterm Solution May 10, 2007 No books, no calculators. One 8.5x11 page of handwritten notes. Name: _ Student ID:_ Problem 1 2 3 4 5 6 Total Score /14 /16 /18 /28 /14 /10 /100 1 1. 14 pts. Let D be a deterministic nite automaton. Construct a nite
School: UCSD
CSE 105: Midterm Solution May 9, 2006 No books, no calculators. One 8.5x11 page of handwritten notes. Problem 0: 1 point: Name: _ Student ID:_ Section (circle one): 8AM 1PM 2PM 3PM Problem 0 1 2 3 4 5 Total Score /1 /30 /24 /15 /30 /10 /100 1 1. 30 pts. P
School: UCSD
CSE 105: Final Solution June 14, 2006 No books, no calculators. One 8.5x11 page of handwritten notes. Name: _ Student ID:_ Section (circle one): 8AM 1PM 2PM 3PM Problem 1 2 3 4 5 6 7 Extra Credit Total Score /15 /18 /18 /14 /15 /15 /5 /15 /100 1 1. 15 pts
School: UCSD
CSE 105: Final June 14, 2006 No books, no calculators. One 8.5x11 page of handwritten notes. Name: _ Student ID:_ Section (circle one): 8AM 1PM 2PM 3PM Problem 1 2 3 4 5 6 7 Extra Credit Total Score /15 /18 /18 /14 /15 /15 /5 /15 /100 1 1. 15 pts. Determi
School: UCSD
Course: Database Systems Principles
CSE 132A Winter, 2015 Solutions to practice problems on tuple calculus and SQL Problem 1 (a) List the bars that serve a beer that Joe likes. (i) tuple calculus: cfw_b : bar | s servesl likes (s(bar) = b(bar) s(beer) = l(beer) l(drinker) = Joe). (ii) SQL:
School: UCSD
Course: Database Systems Principles
CSE 132A Winter, 2015 Practice problems on tuple calculus and core SQL 1. The beer drinkers database consists of the following three relations frequents drinker bar serves bar beer likes drinker The rst indicates the bars each drinker frequents, the secon
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L Fall13 Midterm Exam Practice Questions Example True/False questions: 1. A shell acts as an interface between the user and the system. [T] 2. As a command interpreter, the shell sends the commands to the
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE 140L Final Exam Prof. Tajana Simunic Rosing Spring 2008 Do not start the exam until you are told to. Turn off any cell phones or pagers. Write your name and PID at the top of every page. Do not separate the pages. This is a closed-book, closed-not
School: UCSD
Course: Components And Design Techniques For Digital Systems
School: UCSD
Course: Cse12
1 Sample questions for quiz 5 Here are some sample questions typical of what you'll see in Quiz 5. Guaranteed Initialization _ be used to initialize const data fields in a class. A) must B) can optionally C) cannot Guaranteed Initialization _ be used to i
School: UCSD
Course: CSE 100
CSE 100 Practice Midterm #1 Summer 2014 Problem Topic 1 Data Structure comparisons 2 BSTs 3 BST Running Time Analysis 4 Huffman Coding 5 C+ Total Points Possible Points Earned Grader 100 This exam is closed book, closed notes. Write your name on every pag
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101, Winter 2015 Design and Analysis of Algorithms Instructor: Webpage: Email: Telephone: Office Hours: Office: Prof. Andrew B. Kahng http:/vlsicad.ucsd.edu/~abk/ abk@cs.ucsd.edu 858-822-4884 Wed 1-2pm, Fri 11am-noon, and by appt EBU3B 2134 Class URL:
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 - Winter 2015 Quiz 2 Solutions January 27, 2015 1. True or False: For any DAG G = (V, E) with at least one vertex v V , there must exist at least one topological ordering. (Answer: True) Solution Fact (from class) If G is a DAG, then G has at leas
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 - Winter 2015 Quiz 1 Solutions January 12, 2015 1. What is the maximum possible number of vertices in a binary tree of height h? The height of a binary tree is the length of the longest path from the root vertex to any vertex in the tree. [2h+1 1]
School: UCSD
Course: Discrete Mathematics For Computer Science
CSE 21 Practice Exam for Midterm 1 Winter, 2015 Sorting algorithms (5 points for each part) Give the number of comparisons that will be performed by each sorting algorithm if the input array of length n happens to be already sorted. (a) Min Sort (Selectio
School: UCSD
Course: Discrete Mathematics For Computer Science
CSE 21 Practice Exam for Midterm 1 Winter, 2015 Sorting algorithms (5 points for each part) Give the number of comparisons that will be performed by each sorting algorithm if the input array of length n happens to be already sorted. (a) Min Sort (Selectio
School: UCSD
Course: Intr Computer Sci&obj-orijava
Signature _ cs11f _ CSE 11 Quiz 5 Fall 2012 Name _ Student ID _ This quiz is to be taken by yourself with closed books, closed notes, no calculators. Given the following class definitions: public class Snow cfw_ public void method2() cfw_ System.out.print
School: UCSD
Course: Intr Computer Sci&obj-orijava
Signature _ cs11f _ CSE 11 Quiz 5 Fall 2013 Name _ Student ID _ This quiz is to be taken by yourself with closed books, closed notes, no calculators. Given the following class definitions: public class Snow cfw_ public void method2() cfw_ System.out.print
School: UCSD
Course: Intr Computer Sci&obj-orijava
Signature _ cs11f _ CSE 11 Quiz 5 Fall 2011 Name _ Student ID _ This quiz is to be taken by yourself with closed books, closed notes, no calculators. Given the following partial class definition for Point, fill in the blanks to complete the class definiti
School: UCSD
Course: Intr Computer Sci&obj-orijava
Signature _ cs11f _ CSE 11 Quiz 4 Fall 2013 Name _ Student ID _ This quiz is to be taken by yourself with closed books, closed notes, no electronic devices. What is the output produced by the following program? (Hint: draw stack frames) public class Swap
School: UCSD
Course: Intr Computer Sci&obj-orijava
Signature _ cs11f _ CSE 11 Quiz 4 Fall 2012 Name _ Student ID _ This quiz is to be taken by yourself with closed books, closed notes, no electronic devices. What is the output produced by the following program? (Hint: draw stack frames) public class Swap
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Quiz 4 Fall 2011 Signature _ cs11f _ Name _ Student ID _ This quiz is to be taken by yourself with closed books, closed notes, no electronic devices. What is the output produced by the following program? (Hint: draw stack frames) public class Swap
School: UCSD
Course: Intr Computer Sci&obj-orijava
Signature _ Name _ cs11f _ Student ID _ By filling in the above and signing my name, I confirm I will complete this exam with the utmost integrity and in accordance with the Policy on Integrity of Scholarship. CSE 11 Final Fall 2012 Page 1 _ (17 points) P
School: UCSD
Course: Intr Computer Sci&obj-orijava
Signature _ Name _ cs11f _ Student ID _ CSE 11 Final Fall 2011 Page 1 _ (17 points) Page 2 _ (25 points) Page 3 _ (31 points) Page 4 _ (14 points) Page 5 _ (10 points) Page 6 _ (19 points) Page 7 _ (20 points) Page 8 _ (12 points) Page 9 _ (31 points) Pag
School: UCSD
Final Outline There will be (22) = (11)(2) questions, some with mulitple parts 0. Warm Up Questions / Find the error in the Proof. 1. Sets. 2. Statements and Logic. 3. Direct Proof. 4. Contrapositive Proof. 5. Proof By Contradiction. 6. Induction. More In
School: UCSD
Sample Final Questions for RRR - Complexity Zoo and Counting F1. Find the error in this false statement and correct it: Finding the chromatic number of a graph is NP-complete. F2. Find the error in this false statement and correct it: Solving the Travelin
School: UCSD
Course: Princ Computer Architecture
UCSD CSE240A Fall 2013 Homework 2 Solutions P1. - 5-stage pipeline - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 - 1 lw R3,100(R5) IF ID EX M_ |WB | \| | | 2 add R6,R3,R2 IF ID () |EX M WB | | | | 3 sub R9,R3,R8 IF () |ID EX_ M WB | | \ | 4
School: UCSD
Course: Mathematics For Algorithm And Systems Analysis
CSE 21: Homework 2 October 5, 2009 Problem 1 Teams A and B play in baseballs world series. Here, the team that rst wins four games wins the series. (a) What is the number of ways the series can occur? (b) What is the number of ways the series can occur, g
School: UCSD
Course: Princ Computer Architecture
CSE240aFall2013Homework1,Due,Thursday,October10 Remembertotypeyourhwsolutions. Homework!should!be!typed.!Do!not!forget!to!put!your!name. (fromthebook)H&PA.7aA.8a,(below)P1,P2,P3,P4,P5,P6,P7 P1.ProgramAruns20billioninstructionsona2GHzprocessor,andachievesa
School: UCSD
Course: Intro. To Theory Of Computation
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 5 Instructor: Daniele Micciancio Due on: Wed. Nov 10, 2010 Problem 1 Let BIGGER be the set of all strings over the alphabet cfw_0, 1, > of the form x > y , where x and y are binary n
School: UCSD
Course: Mathematics For Algorithm And Systems Analysis
CSE 21: Homework 3 October 12, 2009 Problem 1 In how many ways can 6 people be assigned to 4 nonempty teams? Problem 2 An urn contains 5 red marbles and 6 white marbles. (a) How many ways can 4 marbles be drawn? (b) What if we must have 2 red marbles and
School: UCSD
Course: Design & Analysis Of Algorithm
Algorithms: CSE 101 Homework II Solve the following problems. Consult the style guide for writing solutions. Each problem is worth 10 points. Problem 1: Finding the k th Smallest Element You are given two sorted lists of size m and n. Give an O(log m + lo
School: UCSD
Course: Princ Computer Architecture
CSE240AFall2013Homework2 Due:Tuesday10/22 Homeworkshouldbetyped. P1. An important design aspect of pipeline architecture is the number of pipeline stages. Your design team has a choice between the following two architectures: 1. A classic 5stage MIPS
School: UCSD
Course: Introduction To The Theory Of Comptuation
CSE 105: Introduction to the Theory of Comptuation Spring 2012 Solution Set 1 Instructor: Alexander Tsiatas Due on: Wed. April 11, 2012 Problem 1 There are many possibilities here. This is just one example. (a) Suppose you want a DFA that accepts strings
School: UCSD
Course: Artificial Intelligence
CSE 150. Assignment 6 Out: Thu Mar 07 Due: Thu Mar 14 Reading: Sutton & Barto, Chapters 1-4. 6.1 CAPE Survey You should have received an email from CAPE asking you to evaluate this course. Please complete the online survey if you have not already done so.
School: UCSD
CSE 151: Introduction to Machine Learning Spring 2012 Problem Set 2 Due on: May 2, 2012 Instructor: Kamalika Chaudhuri Instructions This is a 20 point homework. Problems 1 and 2 are worth 5 points each; Problem 3 is worth 10 points. Problem 1 Draw ID3 de
School: UCSD
A LGORITHMS - CSE 101 Homework 2 Due Thursday, January 21st, 8:00 AM. No exceptions! Turn in solutions to problems 2.22 (page 75), 2.25 (page 76), and 2.30 (page 77). Each problem is worth 10 points. We suggest the following steps in writing up your solut
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 2 Due on: April 25 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
Course: Database Systems Principles
CSE 132A MIDTERM SOLUTIONS November 2014 TOTAL: 25 points Problem 1. True or false (no justication required): (i) If A is an attribute of type integer in a table, then A0 always evaluates to 0 in SQL. Circle one: False (when A is null) (ii) Aliases (tupl
School: UCSD
Course: Advanced Algorithm
Homework Two, for Fri 10/12 CSE 101 When specifying an algorithm, please use pseudocode that is simple and unambiguous. Always justify the correctness and running time of the algorithm, unless these are obvious. 1. Here is yet another multiplication algor
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 2 Due on: April 25 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
CSE 151: Introduction to Machine Learning Spring 2012 Problem Set 1 Due on: April 18, 2012 Instructor: Kamalika Chaudhuri Problem 1 Let u1 , . . . , uk be k vectors such that for each i, ui = 1, and ui , uj = 0 for all i = j . For any vector x, we dene P
School: UCSD
Course: Theory Of Computation
Theory of Computation - CSE 105 Half-Language Solution for Problem 1.42 Idea: Sine is regular, Let be a DFA recognizing . The idea for recognizing is the following: We are given a string and we need to check if there is a string of equal
School: UCSD
Course: Design & Analysis Of Algorithm
Algorithms: CSE 101 Homework I Problem 1: (Function Order) 2 Is the function 2lg n polynomially bounded? Is the function log log n ! polynomially bounded? Justify your answers Solution. bounded. The function 2lg 2 n is not polynomially bounded. The functi
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 0 Due on: April 11 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 1 Due on: April 18 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
Course: A
CSE 250A. Assignment 1 Out: Tue Sep 28 Due: Tue Oct 05 1.1 Conditioning on background evidence [RN 13.9] It is often useful to consider the impact of specic events in the context of general background evidence, rather than in the absence of information. (
School: UCSD
CSE 202 Homework 2 Solutions 1 Kleinberg & Tardos, problem 26, page 202. Time-varying Minimum Spanning Tree. Connected graph G = (V, E ). Each edge e E has a time-varying edge cost fe = ae t2 + be t + ce such that fe > 0 for all t. Denote n = |V | and
School: UCSD
Course: Intro. To Theory Of Computation
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 3 Instructor: Daniele Micciancio Due on: Wed. Oct. 20, 2010 Problem 1 Let L be the set of all strings (over the alphabet cfw_0, 1, +, =) of the form x + y = z , where x, y and z are
School: UCSD
Course: Introduction To The Theory Of Computation
CSE 105: Automata and Computability Theory Winter 2011 Homework #5 Due: Tuesday, March 1st, 2011 Problem 1 Let COMPLDFA be the language A, B A and B are DFAs over the same alphabet and L(A) = L(B ) . (Notice the complementation bar over L(B ) above!) Show
School: UCSD
Course: Intro To Ai Stats Approach
CSE 151: Introduction to Machine Learning Spring 2013 Problem Set 0 Due on: April 11 Instructor: Kamalika Chaudhuri Instructions This is a 40 point homework. Homeworks will graded based on content and clarity. Please show your work clearly for full cred
School: UCSD
Course: Database Systems Principles
Homework 2 CSE 132A Due by noon on Monday, Dec. 8, by sliding under Alins oce door. Problem 2[20pts] Suppose that a B + tree index on (branch-name, branchcity) is available on relation branch. What would be the best way to handle the following selection?
School: UCSD
Course: Artificial Intelligence
CSE 150. Assignment 2 Out: Tue Jan 22 Due: Tue Jan 29 Reading: Russell & Norvig, Chapter 14; Korb & Nicholson, Chapter 2. 2.1 Probabilistic reasoning A patient is known to have contracted a rare disease which comes in two forms, represented by the values
School: UCSD
CSE 21 - Winter 2012 Homework #3 Homework 3 Solutions 3.1 In how many ways can a hand with 6 cards (from an ordinary deck of 52 cards) be made up of 3 pairs? (Note: a pair means two cards with the same value but different suits. We should assume that the
School: UCSD
Course: Intro. To Theory Of Computation
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 2 Instructor: Daniele Micciancio Due on: Wed. Oct 13, 2010 Guidelines: Same as for homework 1. Solutions to the homework should be submitted electronically using turnin, and you shou
School: UCSD
CSE 151: Introduction to Machine Learning Spring 2012 Problem Set 3 Instructor: Kamalika Chaudhuri Due on: May 17, 2012 Instructions This is a 20 point homework. Each problem is worth 5 points. Problem 4 is a programming assignment. For this problem, yo
School: UCSD
Course: Intro. To Theory Of Computation
CSE105 Homework Number 1 SOLUTIONS October 6, 2010 Guidelines: solutions to the homework should be submitted electronically, following the instructions on the class website. As part of your solutions to this assignment you should submit: 1. A le with the
School: UCSD
CSE 202 Homework 1 Solutions 1 Kleinberg & Tardos, problem 4, page 247. Coulomb forces among charged particles. Let Q = (q1 , . . . , qn , 0, . . . , 0) n1 1 1 11 1 1 , . . . , 2 , 2 , 0, 2 , 2 , . . . , ). P = ( 2 (n 1) 2 1 12 (n 1)2 Both vectors have 2n
School: UCSD
Fall 2005 1 Homeworks Review Tri Le Homework Review ASSIGNMENT 2: STACK Data structure of STACK: - a container object that is defined by behavior: o Last In, First Out (LIFO) o First In, Last Out (FILO) - Basic operation: o Push: insert into the s
School: UCSD
Course: Computer Organization And Systems Programming
Programming Assignment One: PA1 Programming Assignment One: PA1 Due Wednesday night, January 30 @ 11:59pm) The purpose of this assignment is to build your knowledge of using SPARC assembly language especially branching and looping logic, calling ass
School: UCSD
Course: Computer Organization And Systems Programming
Programming Assignment Two: PA2 Programming Assignment Two: PA2 Due Wednesday night, February 13 @ 11:59 p.m. For this assignment you will build a BCD (Binary Coded Decimal) clock simulator. BCD is a way to represent decimal digits (0-9) in 4 bits (
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 Homework 6 Winter 2015 This homework is due Friday March 13th at the start of class. Remember to justify your work even if A the problem does not explicitly say so. Writing your solutions in L TEXis recommend though not required. Question 1 (Searc
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 Homework 5 Winter 2015 This homework is due Friday March 6th at the start of class. Remember to justify your work even if the A problem does not explicitly say so. Writing your solutions in L TEXis recommend though not required. Question 1 (Counti
School: UCSD
Course: Components And Design Techniques For Digital Systems
Homework#2 CSE140Spring2015 Prof.TajanaSimunicRosing 1. a. DrawacircuitusingAND,ORandNOTgatesforthefollowingequation: F(a,b,c)=(ab)(b+c) b. ConvertthecircuitusingonlyNANDgates(INVareok) c. ConvertthecircuitusingonlyNORgates(INVareok) 2. a. UseDeMorgansL
School: UCSD
Homework 2 CSE 21 Spring, 2015 Due by 5pm, Friday, April 10 on Ted Before beginning this homework, please review the policies regarding groupbased homework, online submission of homework, and academic integrity, all of which are available on the syllabus.
School: UCSD
Instructions for Homework 1 Due Friday, April 3 by 5pm Homework 1 is intended to be an easy assignment to take care of some logistical things. This homework will be graded in binary; if you complete all five parts, you will get 100% on the first assignmen
School: UCSD
Prove the sum of the first n odd numbers is n^2 Let k be any integer, we need to show P(n) = 2k-1 = n^2 (from i = 1 to n) for all n 1 is true Proo
School: UCSD
Schedule of Reading Assignments These are the reading assignments, broken down by topic, in the order that they will be covered in class. These sections will be covered in the reading quizzes. The reading quizzes are due before the related homework assign
School: UCSD
Homework 3 CSE 21 Spring 2015 Due by 5pm, Friday, April 17 on TED Before beginning this homework, please review the policies regarding groupbased homework, online submission of homework, and academic integrity, all of which are available on the syllabus.
School: UCSD
A91077522 Kuangcong Liu A91016499 Lingyao Gao 1. (a) n(n-1)/2 (b) n(n-1)/2 (c) No matter how the array is arranged, the BubbleSort will make n(n-1)/2 times of comparisons. However, the RevisedBubbleSort will stop if
School: UCSD
Course: Components And Design Techniques For Digital Systems
Homework#1 CSE140Spring2015 Prof.TajanaSimunicRosing 1. Solvethefollowingproblems: I. Convertthefollowingdecimalnumberstobinarynumbers A. 32 B. 23 II. Convertthefollowingbinarynumberstodecimalnumbers A. 1011 B. 10101 III. Convertthefollowinghexadecimalnum
School: UCSD
Course: Theory Of Computation
CSE 105: Automata and Computability Theory Winter 2015 Homework #5 Due: Friday, March 6th, 2015, 11:59 pm Submit your solutions as HW51.pdf, HW52.pdf, HW53.pdf, HW54.pdf using the bundleHW5 command on ieng6. Problem 1 Show that the following language is n
School: UCSD
Course: Theory Of Computation
CSE 105: Automata and Computability Theory Winter 2015 Homework #4 Due: Tuesday, February 17th, 2015, 11:59 pm Problem 1: FST Reductions Consider the following languages over = cfw_0, 1: A = cfw_w cfw_0, 1 : the length of w is a multiple of 3 B = cfw_15n
School: UCSD
Course: Theory Of Computation
CSE 105: Automata and Computability Theory Winter 2015 Homework #6 Due: Friday, March 13th, 2015, 11:59 pm Submit your solutions as HW61.pdf, HW62.pdf and HW63.pdf, using the bundleHW6 command on ieng6. Consider the following two languages L1 = M M is a T
School: UCSD
Course: Theory Of Computation
CSE 105: Automata and Computability Theory Winter 2015 Homework #2 Due: Wednesday, January 21th, 2015, 11:59 pm Problem 1 (Automata Tutor) Complete the problems that constitute CSE 105s HW2 on Automata Tutor. (Problems will be posted soon.) Problem 2 (Clo
School: UCSD
CSE 20, Winter 2015 Homework 4, due 2/9 For each of the questions below, write a complete proof. Explicitly specify what are your assumptions, what are you proving (WTS) and what proof technique are you using (direct proof, proof by contradiction, etc). Q
School: UCSD
CSE 20, Winter 2015 Homework 7, due 3/9 For each of the questions below, write a complete proof. Explicitly specify what are your assumptions, what are you proving (WTS) and what proof technique are you using (direct proof, proof by contradiction, etc). Q
School: UCSD
Priya Patel - A09815104 Stephanie Villalobos - A10858223 Tanvi Kolte - A10483784 Tanya Cheung - A10893346 CSE20: Homework 1 We mostly just used the book as reference when completing these problems. Outside of that we just searched online if certain number
School: UCSD
CSE 20, Winter 2015 Homework 5, due 2/16 For each of the questions below, write a complete proof. Explicitly specify what are your assumptions, what are you proving (WTS) and what proof technique are you using (direct proof, proof by contradiction, etc).
School: UCSD
CSE 20, Winter 2015 Homework 2, due 1/19 Question 1: Let p="There are clouds in the sky", q="It is raining". Write the expression "If it is not raining, then there are no clouds in the sky" as a (a) Boolean expression (b) Truth table Question 2: Consider
School: UCSD
CSE 20, Winter 2015 Homework 6, due 2/23 For each of the questions below, write a complete proof. Explicitly specify what are your assumptions, what are you proving (WTS) and what proof technique are you using (direct proof, proof by contradiction, etc).
School: UCSD
CSE 20, Winter 2015 Homework 3, due 1/26 Question 1: Let = cfw_ : 1 100, 6| (a) What is the size of A? (b) Let = cfw_ : 1 100, 2| 3| . Is A=B? Prove or disprove. Question 2: Compute the following sets: (a) (b) (c) Question 3: Give examples of sets A,
School: UCSD
CSE 132A Homework# 2 Winter, 2015 Due on Tuesday, March 10 (in class and pdf le, see instructions) This is an individual assignment 1. Let R be a relation with attributes ABCD. Consider the SQL conjunctive query select z.D from R x, R y, R z where y.C = 0
School: UCSD
Course: Discrete Mathematics For Computer Science
Homework 7 CSE 21 Winter 2015 Due by 5pm, Monday, March 2 on TED Before beginning this homework, please review the policies regarding groupbased homework, online submission of homework, and academic integrity, all of which are available on the course webs
School: UCSD
Course: Discrete Mathematics For Computer Science
Homework 7 CSE 21 Winter 2015 Due by 5pm, Monday, March 2 on TED Before beginning this homework, please review the policies regarding groupbased homework, online submission of homework, and academic integrity, all of which are available on the course webs
School: UCSD
Course: Discrete Mathematics For Computer Science
Homework 6 CSE 21 Winter 2015 Due by 5pm, Friday, February 20 on TED Before beginning this homework, please review the policies regarding groupbased homework, online submission of homework, and academic integrity, all of which are available on the course
School: UCSD
Course: Database Systems Principles
Here is a schema about battleships and the battles they fought in: Ships(name, yearLaunched, country, numGuns, gunSize, displacement) Battles(ship, battleName, result) A typical Ships tuple would be: ('New Jersey', 1943, 'USA', 9, 16, 46000) which means t
School: UCSD
Lab 2 Part 1: 2's complement Booth's Multiplication Build a 11-bit two's complement multiplier using Booth's algorithm. Part 2: Equivalence Checking Decide whether the function pairs are equivalent or not by implementing these functions and applyi
School: UCSD
Lab Assignment 4 Carry Look-ahead Adder/Subtractor and Hazard Free Design Due February 28, Thursday, 1:00pm Introduction: This lab assignment consists of two parts: (1) Implementation of a carry look-ahead excess-3 adder/subtractor, and (2) Hazard an
School: UCSD
Course: Intro Computer Science Java
public class Lab8c cfw_ public static void main(String [] args) cfw_ /* PART C * double [] grades = new double[3]; grades[0] = 4.0; grades[1] = 4.0; grades[2] = 3.0; Student student = new Student("Ryan Montgomery", grades, "Linguistics"); Syste
School: UCSD
Course: Intro Computer Science Java
public class Lab8c cfw_ public static void main(String [] args) cfw_ /* PART C * double [] grades = new double[3]; grades[0] = 4.0; grades[1] = 4.0; grades[2] = 3.0; Student student = new Student("Ryan Montgomery", grades, "Linguistics"); System.out.print
School: UCSD
Course: Intro Computer Science Java
public class Lab8a cfw_ public static void main(String [] args) cfw_ /* PART A * Student a = new Student(); System.out.println(a); Student b = new Student("Marshall Mathers"); System.out.println(b); double [] grades = new double[3]; grades[0]=
School: UCSD
Course: Intro Computer Science Java
public class Lab8b cfw_ public static void main(String [] args) cfw_ /* PART B * /This won't work until you finish Part B! Student e = new Student(); boolean name = e.setName("Aaron Yates"); System.out.println("Name was successfully set: " + name); boolea
School: UCSD
Course: Intro Computer Science Java
public class Lab8a cfw_ public static void main(String [] args) cfw_ /* PART A * Student a = new Student(); System.out.println(a); Student b = new Student("Marshall Mathers"); System.out.println(b); double [] grades = new double[3]; grades[0]=4.0; grades[
School: UCSD
Course: Intro Computer Science Java
public void echo(int delay) cfw_ Sound s = new Sound(this.getFileName(); int value = 0; for (int i = delay; i < this.getLength(); i+) cfw_ value = (int) (s.getSampleValueAt(i-delay) * 0.6); this.setSampleValueAt(i,this.getSampleValueAt(i) + value);
School: UCSD
Course: Intro Computer Science Java
public class Lab7B cfw_ public static void main(String[] args) cfw_ / Pick CSE8ARocks.wav for this one - you should have copied it to / your LABS/mediasources Sound s = new Sound(FileChooser.pickAFile(); / s.explore(); /s.echo(15000); s.blockingPlay();
School: UCSD
Course: Intro Computer Science Java
/* * Lab7A.java */ public class Lab7A cfw_ public static void main(String[] args) cfw_ / Browse to your mediasources directory to choose these sound files / Pick sec3silence.wav for this one Sound result = new Sound(FileChooser.pickAFile(); / Pick Elliot-
School: UCSD
Course: Intro Computer Science Java
public void clipInto(Sound otherSound, int nsamples) cfw_ for (int i = 0; i < nsamples; i+) cfw_ int value = otherSound.getSampleValueAt(i); this.setSampleValueAt(i, value); /* public void clipInto(Sound otherSound, int nsamples) cfw_ Sound
School: UCSD
Course: Intro Computer Science Java
/* * Lab 6B -Explore the number of bits used to store a pixel and its effect on the picture */ import java.io.*; public class Lab6B cfw_ public static void main (String[] args) cfw_ String fileName = FileChooser.pickAFile(); Picture originalPic = new Pict
School: UCSD
Course: Intro Computer Science Java
/* * Lab 6B -Explore the number of bits used to store a pixel and its effect on the picture */ import java.io.*; public class Lab6B cfw_ public static void main (String[] args) cfw_ String fileName = FileChooser.pickAFile(); Picture originalPic
School: UCSD
Course: Intro Computer Science Java
/* * Lab 5B - exploring if - else if - else with grade assignment */ import java.io.*; public class Lab5B cfw_ public static void main (String[] args) throws IOException cfw_ / Get the student grade from the user System.out.println("Please enter the
School: UCSD
Course: Intro Computer Science Java
/* * Lab5A: Changing the color of a bird */ public class Lab5A cfw_ public static void main( String[] args ) cfw_ String sourceFile = FileChooser.pickAFile(); Picture input1 = new Picture( sourceFile ); input1.explore(); Picture redBird = input1.upperHalf
School: UCSD
Course: Intro Computer Science Java
/* * Lab5A: Changing the color of a bird */ public class Lab5A cfw_ public static void main( String[] args ) cfw_ FileChooser.setMediaPath("/home/linux/ieng6/cs8afa/public/mediasources/" ); Picture input1 = new Picture( "bird1.jpg" ); input1.explor
School: UCSD
Course: Intro Computer Science Java
/* * Lab 5B - exploring if - else if - else with grade assignment */ import java.io.*; public class Lab5B cfw_ public static void main (String[] args) throws IOException cfw_ / Get the student grade from the user System.out.println("Please enter the stude
School: UCSD
Course: Intro Computer Science Java
/* * Lab 4b: A collage with off by one errors and simple if statements */ public class Lab4b cfw_ public static void main(String[] args) cfw_ String sourceFile = FileChooser.pickAFile(); Picture sourcePic = new Picture(sourceFile); sourcePic.createForLab4
School: UCSD
Course: Intro Computer Science Java
/* * Lab 4 Part A: Exploring nested for loops */ public class Lab4a cfw_ public static void main(String[] args) cfw_ int total = 0; for (int rows = 0; rows < FILLIN; rows+) cfw_ for (int cols = 0; cols < FILLIN; cols+) cfw_ +total; System.out.
School: UCSD
Course: Intro Computer Science Java
/* * Lab 4 Part A: Exploring nested for loops */ public class Lab4a cfw_ public static void main(String[] args) cfw_ int total = 0; for (int rows = 0; rows < 10; rows+) cfw_ for (int cols = 0; cols < 5; cols+) cfw_ +total; System.out.println("Round: " + t
School: UCSD
Course: Intro Computer Science Java
public void createForLab4B() cfw_ /PLEASE INITIALIZE US! int r; int g; int b; int limit1; int limit2; int incrementor; for(int y = 0; y < limit1; y += incrementor) cfw_ for(int x = 0; x < limit2; x+) cfw_ this.getPixel(x, y).setColor(new Colo
School: UCSD
Course: Intro Computer Science Java
/* * Lab 3 Part B: The application to test simpleGrayscaleVersion2() */ public class Lab3b cfw_ public static void main( String[] args ) cfw_ Picture myPic = new Picture( FileChooser.pickAFile() ); myPic.show(); Picture picGray = new Picture( myPic ); pic
School: UCSD
Course: Intro Computer Science Java
/* * Lab 3 Part A: The application to test simpleGrayscale() */ public class Lab3a cfw_ public static void main( String[] args ) cfw_ Picture pic = new Picture( FileChooser.pickAFile() ); Picture picGray = new Picture(pic); pic.show(); picGray.simpleGrays
School: UCSD
import import import import import import import java.awt.*; java.awt.font.*; java.awt.geom.*; java.awt.image.BufferedImage; java.text.*; java.util.*; java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
import java.io.*; import java.util.*; public class Student cfw_ / fields / private String name; private double[] gradeArray; private String major; / constructors / public Student() cfw_ this.name = "Joe Student"; this.gradeArray = new double[10]; this.maj
School: UCSD
import java.io.*; import java.util.*; public class Student cfw_ / fields / private String name; private double[] gradeArray; private String major; / constructors / public Student() cfw_ this.name = "Joe Student"; this.gradeArray = new double[10];
School: UCSD
/* * Class that represents a sound. This class is used by the students * to extend the capabilities of SimpleSound. * * Copyright Georgia Institute of Technology 2004 * @author Barbara Ericson ericson@cc.gatech.edu */ public class Sound extends SimpleSoun
School: UCSD
/* * Class that represents a sound. This class is used by the students * to extend the capabilities of SimpleSound. * * Copyright Georgia Institute of Technology 2004 * @author Barbara Ericson ericson@cc.gatech.edu */ public class Sound extends S
School: UCSD
import import import import import import import java.awt.*; java.awt.font.*; java.awt.geom.*; java.awt.image.BufferedImage; java.text.*; java.util.*; java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
/* * Lab 6A: The aim is to store fewer bits and try to preserve as much information as we can. */ import java.io.*; public class Lab6A cfw_ public static void main (String[] args) throws IOException cfw_ / This is a "dummy Picture" that we use just to cal
School: UCSD
import java.awt.*; import java.awt.font.*; import java.awt.geom.*; import java.awt.image.BufferedImage; import java.text.*; import java.util.*; import java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
import java.awt.*; import java.awt.font.*; import java.awt.geom.*; import java.awt.image.BufferedImage; import java.text.*; import java.util.*; import java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
import import import import import import import java.awt.*; java.awt.font.*; java.awt.geom.*; java.awt.image.BufferedImage; java.text.*; java.util.*; java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
import java.awt.*; import java.awt.font.*; import java.awt.geom.*; import java.awt.image.BufferedImage; import java.text.*; import java.util.*; import java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
import import import import import import import java.awt.*; java.awt.font.*; java.awt.geom.*; java.awt.image.BufferedImage; java.text.*; java.util.*; java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
import java.awt.*; import java.awt.font.*; import java.awt.geom.*; import java.awt.image.BufferedImage; import java.text.*; import java.util.*; import java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
import import import import import import import java.awt.*; java.awt.font.*; java.awt.geom.*; java.awt.image.BufferedImage; java.text.*; java.util.*; java.util.List; / resolves problem with java.awt.List and java.util.List /* * A class that represents a
School: UCSD
Lab 4 CSE 3, Winter 2015 In this lab we will learn more Microsoft Excel and create an annual budget. A. Annual Budget One of the most common uses of a spreadsheet is to chart financial information. We are going to create an annual budget for your projecte
School: UCSD
Course: Database Systems Principles
.mode columns .headers on create table sailor (sname, rating); create table boat (bname, color, rating); create table reservation (sname, bname, day); insert into sailor values ('Brutus', 1); insert into sailor values ('Andy', 8); insert into sailor value
School: UCSD
Course: Database Systems Principles
Consider the following database schema for a BOOKSTORE database: Books (bookid, title, author, year) Customers (customerid, name, email) Purchases (customerid, bookid, year) Reviews (customerid, bookid, rating) Pricing (bookid, format, price) Given the ab
School: UCSD
Lab 2 CSE 3, Winter 2015 In this lab you will learn about file structures and advanced features of Microsoft Word. You will then work on an HTML calendar to prep yourself for Lab 3. Enabling file extensions in Windows Explorer Windows will hide file exten
School: UCSD
Lab 1 CSE 3, Winter 2015 In this lab you will create a basic homepage and put it up online. You will then start a tutorial to reinforce how to use the SSH program. ADMINISTRIVIA Tutors: KevinN Arturo Brian Charlie Jessica Jungyoon Katie Kenny KevinP Kevin
School: UCSD
Lab 3 CSE 3, Winter 2015 In this lab you will learn and implement some basic html. Enabling file extensions in Windows Explorer Windows will hide file extensions that are known by default. It is meant to be a convenience, but it is actually confusing and
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2014 - http:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 15 May 21st, 2014 Todays Topics 1. Profiling 2 Reasons for Diagnostic Output Tracing Timing Profiling Logging Error repor
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2014 - http:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 17 June 2nd, 2014 Software Techniques Software version control Creating good tests Automating builds and tests Strategies
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2014 - http:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 16 May 28th, 2014 Todays Topics 1. 2. 3. 4. Review of diagnostic output Disabling logging Unix time command Reporting bug
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2014 - http:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 12 May 12th, 2014 Todays Topics 1. XML 2. Ant 2 An Introduction to XML (slides based on PRINCIPLES OF DATA INTEGRATION) C
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2014 - http:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 13 May 14th, 2014 Todays Topics 1. Diagnostic output 2 Diagnostic Output from Programs So far we have concentrated on un
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2014 - hBp:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 14 May 19th, 2014 Todays Topics 1. More diagnosSc ou
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2014 - http:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 11 May 5th, 2014 Todays Topics 1. Midterm review 2 Key elements of the software development pipeline Software Development
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2014 - hBp:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 3 April 7th, 2014 Todays Topics 1. Integrated Develop
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2014 - hBp:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 10 April 30th, 2014 Todays Topics 1. Shell scripRng
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2014 - http:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 9 April 28th, 2014 Todays Topics 1. Chmod command 2. Shell scripting programming constructs Shell variables and operator
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2014 - hBp:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 2 April 2nd, 2014 Todays Topics 1. So*ware version
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2014 - hBp:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 8 April 23rd, 2014 Todays Topics 1. IntroducSon to s
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2014 - http:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 7 April 21st, 2014 Todays Topics 1. Introduction to debugging 2. Scientific method of debugging 2 Debugging Software sho
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2014 - hBp:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 6 April 16th, 2014 Todays Topics 1. More vi 2. So*w
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2014 - hBp:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 5 April 14th, 2014 Todays Topics 1. IntroducQon to U
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2014 - hBp:/cs15sp2014.weebly.com Dr. ILKAY ALTINTAS TA: ALOK SINGH Lecture 4 April 9th, 2014 Todays Topics 1. Eclipse in acRon
School: UCSD
Course: Programming Languages
86 3. Loops and Conditional Statements (x>1) & (x<2) | (x>=4) We could use the commands in a dierent form # a = and(x>1,x<2); b = (x>=4); c = or(a,b) " ! by making use of the and and or commands. Notice here we have actually set Boolean variables a, b and
School: UCSD
Course: Programming Languages
3.4 Conditional Statements 85 The only value which is less than (or equal to) one and greater than (or equal to) one is one itself. The answer is the single value one, written as cfw_1. 6. (x>2) This is our rst example of negation, which is read as x is n
School: UCSD
Course: Programming Languages
84 3. Loops and Conditional Statements NOT () This simply changes the state so (true)=false and (false)=true. We pause and just run through these logical operators: a AND b This is true if both a and b are true a OR b This is true if one of a and b is tru
School: UCSD
Course: Programming Languages
3.4 Conditional Statements 83 3.4 Conditional Statements MATLAB has a very rich vocabulary when it comes to conditional operations but we shall start with the one which is common to many programming languages (even though the syntax may vary slightly). Th
School: UCSD
Course: Programming Languages
82 3. Loops and Conditional Statements 3.3.4 Loops Within Loops (Nested) Many algorithms require us to use nested loops (loops within loops), as in the example of summing series on page 75. We illustrate this using a simple example of constructing an arra
School: UCSD
Course: Programming Languages
3.3 Summing Series 81 This kind of expression will prove to be very useful when we come to consider numerically evaluating integrals in a later chapter. Example 3.8 Evaluate the expression N 1+ n=1 2 n for N = 10 (the symbol means the product of the terms
School: UCSD
Course: Programming Languages
78 3. Loops and Conditional Statements > sinx sinx = 0 0.0998 0.1987 0.2955 0.3894 0.4794 These values can be compared to those calculated directly by MATLAB to give > sin(v) ans = 0 0.0998 0.1987 0.2955 0.3894 0.4794 0.1388 0.2776 0 -0.5551 0 > sinx-sin(
School: UCSD
Course: Programming Languages
3.3 Summing Series 79 5 2 N = 10; total = 0; for n = 0:N total = total + exp(-n); end 4 3 To test for convergence of our results we should compare our answer for different values of N. Fortunately, in this case, we are able to work out the value of the tr
School: UCSD
Course: Programming Languages
80 3. Loops and Conditional Statements i_squared = i.2; Now we use the MATLAB command sum to evaluate this: value = sum(i_squared) (notice here we have left o the semicolon so the result is displayed automatically). The full code for this example is # i =
School: UCSD
Course: Programming Languages
3.3 Summing Series 77 We can use this to approximate sin x by an innite series in x as N (1)n sin x = lim N n=0 x2n+1 . (2n + 1)! Of course in using a computer we cannot actually take N to be innity, but we shall take it to be large in the hope that the
School: UCSD
Course: Programming Languages
76 3. Loops and Conditional Statements polyfit(x,y,n) which returns the coecients of order n through the points in (x, y). For the examples p = 2 and p = 3 we have > sumser2 Please enter the power you require 2 coe = 1/3 1/2 1/6 * > sumser2 Please enter t
School: UCSD
Course: Programming Languages
74 3. Loops and Conditional Statements 9 % Summing series 6 N = input(Please enter the number of terms required ); p = input(Please enter the power ); sums = 0; for j = 1:N sums = sums + jp; end disp([Sum of the first int2str(N) . integers raised to the
School: UCSD
Course: Programming Languages
3.3 Summing Series 75 It seems reasonable to expect that the sum for a certain power of p will be of degree p + 1. In order to determine the coecients of a polynomial of degree p + 1 we require p + 2 points. Consider this example: 9 6 clear all format rat
School: UCSD
Course: Programming Languages
3.3 Summing Series 73 The second line simply works out the required value. Notice that MATLAB already has a variable pi. The above code is now modied to: 9 maxN = input(Enter the maximum value of N required: ); I(1) = f(1); 6 for N=2:maxN I(N) = I(N-1) +
School: UCSD
Course: Programming Languages
72 3. Loops and Conditional Statements 9 maxN = input(Enter the maximum value of N required: ); I(1) = 12; 6 for N = 2:maxN I(N) = I(N-1) + N2; end disp([Values of I_N]) disp([1:N; I]) 8 7 This code uses a vector I to store the results of the calculation.
School: UCSD
Course: Programming Languages
3.3 Summing Series 71 Again we have used the command int2str to change the variable s into a string. This only works correctly if s is an integer. If s is not an integer we need to use the command num2str which changes a general number to a string. In all
School: UCSD
Course: Programming Languages
68 3. Loops and Conditional Statements where t and s correspond to the two expressions above. So far we have dealt with products: in the next example we shall consider a simple summation. Example 3.5 Determine the sum of the geometric progression 6 2n . n
School: UCSD
Course: Programming Languages
70 3. Loops and Conditional Statements disp([I have int2str(apple) apples]) gives I have 8 apples, as required: for more information on this command see page 185. We can break down our summation code as follows: The rst line simply asks the user to enter
School: UCSD
Course: Programming Languages
3.3 Summing Series 69 If we were to do this on paper we would probably write down all the terms in the summation and then add them up: evaluating the terms in the series 4 i2 = 1 + 4 + 9 + 16 i=1 and adding them up we obtain 30. At this stage we can add t
School: UCSD
Course: Programming Languages
3.2 Loops Structures 67 9 6 prod = 1; mfact = 1; for i = 0:(m-1) mfact = mfact * (i+1); prod = prod * (n-i); end soln = prod/mfact; 8 7 Breaking up the calculation like this can lead to problems for large values of m and so it is often best to work out th
School: UCSD
Course: Programming Languages
66 3. Loops and Conditional Statements The following simple example shows how loops can be used not only to repeat instructions but also to operate on the same quantity. Example 3.3 Suppose we want to calculate the quantity six factorial (6! = 6 5 4 3 2 1
School: UCSD
Course: Programming Languages
3.2 Loops Structures 9 str = times seven is ; 65 6 for j = 1:10 x = 7 * j ; disp([int2str(j) str int2str(x)]) end 8 7 The rst line sets the variable str to be the string times seven is and this phrase will be used in printing out the answer. In the code t
School: UCSD
Course: Programming Languages
64 3. Loops and Conditional Statements 9 % % looping.m % N = 5; for ii = 1:N disp([int2str(ii) squared equals int2str(ii2)]) end 8 This gives the output 1 2 3 4 5 squared squared squared squared squared equals equals equals equals equals 6 7 1 4 9 16 25 T
School: UCSD
Course: Programming Languages
2.5 Tasks 59 Task 2.7 The code 1 ( clear x y x = -2:0.1:2; y = 9-x.2; plot(x,y) 0 ) 2 plots the function y = 9 x for x [2, 2] in steps of 1/10. Modify the code so the function y = x3 + 3x is plotted between the same limits and then for x [4, 6] in steps o
School: UCSD
Course: Programming Languages
58 2. Writing Scripts and Functions 9 6 a = input(Enter a : ); b = input(Enter b : ); res = mod(a,b); str1 = The remainder is ; str2 = when ; str3 = is divided by ; disp([str1 num2str(res) str2 . num2str(a) str3 num2str(b)]); 8 7 which should be saved as
School: UCSD
Course: Programming Languages
60 2. Writing Scripts and Functions where the user inputs N . 9 N=input(Enter N ) 6 for i=1:n sum = 1/j + 1/(j+2)*(j+3) end disp( The answer is s]) 8 7 Make sure the code gives the correct answer, for instance for N = 1. 3. Calculate the function f (x) =
School: UCSD
Course: Programming Languages
3 Loops and Conditional Statements 3.1 Introduction We now consider how MATLAB can be used to repeat an operation many times and how decisions are taken. We shall conclude with a description of a conditional loop. The examples we shall use for demonstrati
School: UCSD
Course: Programming Languages
2.5 Tasks 61 (a) Construct a code which converts a speed in miles per hour to kilometres per hour. (b) Write a code which converts metres per second to miles per hour and use it to determine how fast a sprinter who runs the 100 metres in 10 seconds is tra
School: UCSD
Course: Programming Languages
2.4 Errors 53 Example 2.13 Determine a value of x such that f (x) = x2 + 4x = 40. We start by guessing that x = 6 is the root we require: x = 6, f (6) = 60 > 40 which is too big, try x = 5. x = 5, f (5) = 45 > 40 which is still too big, try x = 4. x = 4,
School: UCSD
Course: Programming Languages
2.5 Tasks 57 asterisk between the two factors and secondly we have a unbalanced bracket. v3 = a/b*c This has one error but it is one of the most common ones. As mentioned previously this evaluates a c. We need to force the calculation b bc to be performed
School: UCSD
Course: Programming Languages
2.4 Errors 55 rect); somewhat bizarrely cos pi yields a row vector (which has the cosines of the ASCII values of the letters p and i as elements). 4. Mathematical errors incorporated into the numerical scheme the code seeks to implement. These usually occ
School: UCSD
Course: Programming Languages
54 2. Writing Scripts and Functions 1 ( sin(15*pi) (sqrt(2)2 1000*0.001 1e10*1e-10 0 ) To calculate the absolute errors we need to know the exact answers which are 0, 2, 1 and 1 respectively. We can use the code: 1 ( abs(sin(15*pi) abs(sqrt(2)2-2) abs(100
School: UCSD
Course: Programming Languages
56 2. Writing Scripts and Functions 9 a = input( Please entere a ) b = 1nput( Please enter b ) a = Input Please enter c 6 v1 = a+ B+d v2 = a/(b+c)(c+a) v3 = a/b*c disp( a + b + c= int2str(v1)]) disp([v2 = num2str v2 ] disp([v3 = num2str(v4) ]); 8 7 We sh
School: UCSD
Course: Programming Languages
2.3 Functions of Functions 49 1 p = [1 1 41]; x = 1:40; f = polyval(p,x); isprime(f) 0 ( ) the function isprime(f) returns a value of 1 if the element of f is a prime and 0 if it is not. The result of our calculation is a string of 39 ones demonstrating t
School: UCSD
Course: Programming Languages
2.4 Errors 51 This function takes as input a function name and a vector x and produces a labelled plot. Notice although there are two inputs for this function there are no values output; the gure is the output. 1 0.8 0.6 0.4 sin(x) 0.2 0 0.2 0.4 0.6 0.8 1
School: UCSD
Course: Programming Languages
48 2. Writing Scripts and Functions 9 6 % % evaluate_poly3.m % function [f,fprime] = evaluate_poly3(a,x) f = a(1)*x.2+a(2)*x+a(3); fprime = 2*a(1)*x+a(2); 8 7 which can be called using # x = -5:0.5:5; a = [1 2 1]; [f,fp] = evaluate_poly3(a,x); " ! Before
School: UCSD
Course: Programming Languages
52 2. Writing Scripts and Functions computer other than by truncating the sequence. We would use the notation 1/3 0.3333. Obviously the more threes we retain the more accurate the answer. Almost all numerical schemes are prone to some kind of error. It is
School: UCSD
Course: Programming Languages
50 2. Writing Scripts and Functions (using dot arithmetic to allow for the possibility of vector arguments x). To use this in calculating the value of the composite function h(x) we need to be able to pass the function name to f as an argument. We can do
School: UCSD
Course: Programming Languages
2.2 Plotting Simple Functions 47 1 sine cosine 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 4 3 2 1 0 1 2 3 4 In this case the legend has been placed in the top right corner, however its location can be changed, see help legend for details. We now return to our di
School: UCSD
Course: Programming Languages
46 2. Writing Scripts and Functions 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 4 3 2 1 0 1 2 3 4 from which the command syntax can be deduced; a plot of sin(x) versus x using a solid red line and a plot of cos(x) versus x using a blue dotted line (if the plot
School: UCSD
Course: PROBABILITY AND STATISTICS
P (B|A)P (A) P (B) description 6. Bayes Rule: P (A|B) = These pages are a summary of the formulas used in CSE103. You can use this as a basis for your handwritten cheat-sheet. However, you cannot bring a printout of these pages to the nal exam. 7. Conditi
School: UCSD
CSE 112 Discussion 26 Jan 2015 Requirements Gathering Methodologies Req. gathering techniques 1. Ethnographic methods a. Sometimes, the best way to understand is observe users at work b. Study the context of work and watch work being done in users own nat
School: UCSD
Course: Database Systems Principles
CSE 132A Assignment #1 (SQL) Answers on sample data Consider the following instance of the Reservations sailor sname rating boat bname Brutus 1 SpeedQueen Andy 8 Interlake Horatio 7 Marine Rusty 8 Bay Bob 1 reservation sname bname day Andy Interlake Monda
School: UCSD
Course: Advanced Data Structures
CSE 100 Final Exam Study Guide, Fall 2014 CSE Department University of California, San Diego 1 Final Exam The nal exam will cover all the data-structures and algorithms that we have covered during the quarter, including all the readings, class discussions
School: UCSD
Course: Advanced Data Structures
CSE 140 Lecture 14 System Design CK Cheng CSE Dept. UC San Diego 1 Design Process Describe system in programs Data subsystem List data operations Map operations to functional blocks Add interconnect for data transport Input control signals and outpu
School: UCSD
Course: Int Artif Intellsearch&reason
CSE 20: Assignment Set 1 1. Write down the following integers in base 7: (a) 245 (b) 98 (c) 2014 Solution: (a) 500 (b) 200 (c) 5605 2. What is the representation of the number [2402]5 in base 2? Solution: [2402]5 = 2 53 + 4 52 + 0 51 + 2 50 = [352]10 = [1
School: UCSD
Course: Programming Languages
OCAML # insert [] 10; - : int list = [10] # insert [1;2;3;4] 3; -: int list = [1;2;3;3;4] let rec insert l i = match l with | [] -> [i] | h:t -> if h < i then h : (insert t i) else i : h : t count (=) 7) [1;2;3;4;5;6;7;8;9] count (!=) 8) [1;2;3;4;5;6;7;8;
School: UCSD
Course: Server-side Application
Javascript and Ajax You are the owner and programmer of the new web application SmashingSuccess, which has millions of users. The following page is the page where new users register for an account. A problem is that nowadays the users often get frustrated
School: UCSD
Course: Server-side Application
CSE 135 Discussion Section #2 JSP practices Why Servlets Went Out of Fashion Nowadays very few programmers write http servlets directly in Java. Consider the following possible reasons and mark which ones are true: - YES NO: Programmers gave up on writi
School: UCSD
Assignments, Labs and Schedule - CSE 8A Fall 2014 10/4/14, 7:28 AM CSE 8A Fall 2014 Welcome to CSE 8A! Search this site Assignments, Labs and Schedule Slides and Resources Tutor Hours Syllabus Assignments, Labs and Schedule Important information about whe
School: UCSD
SW Dev is tedious Find things, switch between files Switch between activities (edit, build, run, debug, testing) Switch between different builds (deployment vs. testing) Write test cases Many code properties are invisible (where's that class, where's
School: UCSD
Course: Design & Analysis Of Algorithm
CSE 101 Class Notes Today: Recursion vs. Iteration October 16, 2006 On a different subject, here we explore the relationship between recursion and iteration, using as an example the simple problem of finding the maximum of an array. This case is a particu
School: UCSD
Course: Theory Of Computation
Discussion board: We will be using Piazza for class discussion, posting important announcements, distributing assignments, etc. Sign up for the class on piazza clicking here and following the instructions.
School: UCSD
Course: Mathematics For Algorithm And Systems Analysis
CSE 21 Study Guide Disclaimer: Doing all these problems will not guarantee you an A. I do not write the nal, and I do not know what will be on it. However, I have tried to cover the basics. So, if you can do all of these without any help from the book, yo
School: UCSD
Course: Theory Of Computation
Theory of Computation - CSE 105 Computability Study Guide Chapter 3: The ChurchTuring Thesis 1. Exercises: 3, 6, 7, 8 - Page 147. 2. Problems: 9-15, 19, Page 149. Chapter 4: Decidability Problems: 10-22, Page 16970. Chapter 5: Reducibility 1. Prob
School: UCSD
University of California, San Diego Department of Computer Science and Engineering CSE 3 Fluency with Information Technolgy Wtr 2014 Lecture: MWF noon-12:50pm WLH 2005 Instructor: Office: Office Hours: Email: Susan Marx EBU-3B Room 2206 (CSE bldg across f
School: UCSD
CSE21 - Mathematics for Algorithms and Systems Spring 2015 Syllabus Instructors: Teaching Assistants: Tutors: Russell Impagliazzo Janine Tiefenbruck Michelle Bodnar Mayank Dhiman Jiawei Gao Dmitriy Kunitskiy Shibu Lawrence Devin Platt Joseph Deon Sara Far
School: UCSD
Course: Theory Of Computation
CSE105:AutomataandComputabilityTheory Winter2015 Instructor:HovavShacham,hovav@cs.ucsd.edu Textbook:M.Sipser:IntroductiontotheTheoryofComputation,2nded. OptionalTextbook:T.Stuart:UnderstandingComputation OptionalTextbook:M.Lipovaa:LearnYouaHaskellforGreat
School: UCSD
University of California, San Diego Department of Computer Science and Engineering CSE 3 Fluency with Information Technolgy Wtr 2015 Lecture: Instructor: Office: MWF noon-12:50pm Center 115 Office Hours: Email: Email help: Web page: Susan Marx EBU-3B Room
School: UCSD
Syllabus - CSE 8A Fall 2014 10/4/14, 7:31 AM CSE 8A Fall 2014 Welcome to CSE 8A! Assignments, Labs and Schedule Search this site Slides and Resources Tutor Hours Syllabus Syllabus Welcome to CSE 8A! We are excited to have you in this course. In this class
School: UCSD
Course: Advanced Data Structures
CSE 100 Advanced data structures Data structures lay at the very core of effective software engineering. The use of an appropriate structure to solve the problem at hand is the true difference between a software engineer and a programmer/hacker. In the re
School: UCSD
Course: Intro Discrete Mathematics
Welcome to CSE 20 Discrete Mathematics Instructor: Cynthia Lee Email: clbailey@cs.ucsd.edu* Office Hours: 2-3pm Wednesdays TA: Sat Garcia Email: sat@cs.ucsd.edu* Office Hours: 4-5pm Mondays * Questions: All non-confidential questions should be posted
School: UCSD
CSE 8B: Introduction to Computer Science: Java Winter 2009 Course Basics (additional IMPORTANT information is on the class web page. READ IT!) Instructor: Office: Phone: Email: Office Hours: Dr. Beth Simon (call me "Beth" or "Dr. Simon") CSE 4104 858
School: UCSD
Course: Advanced Data Structures
Course URL: http:/www.cse.ucsd.edu/classes/fa08/cse100/ Welcome to CSE 100 Data Structures Instructor: Cynthia Lee Email: clbailey@cs.ucsd.edu* Office Hours: Th 12:20p 2:00p in CSE 3254 TA: Brian McFee Email: bmcfee@cs.ucsd.edu* Office Hours: TBA *
School: UCSD
Course: Discrete Mathmatics
Welcome to CSE 20 Discrete Mathematics Instructor: Cynthia Lee Email: clbailey@cs.ucsd.edu* Office Hours: 2-3pm Wednesdays TA: Sat Garcia Email: sat@cs.ucsd.edu* Office Hours: 4-5pm Mondays * Questions: All non-confidential questions should be posted
School: UCSD
UNIVERSITY OF CALIFORNIA, SAN DIEGO CHEMISTRY 6AH SYLLABUS Fall Quarter 2006 Honors General Chemistry General Information: Dr. Carl Hoeger York 4030 858-534-6434 choeger@ucsd.edu (NOTE: When sending e-mail, please put 6AH somewhere in subject line)
School: UCSD
Course: Design And Analysis Of Algorithms
CSE 202, Design and Analysis of Algorithms , Fall, 2006 CSE 202, Design and Analysis of Algorithms , Fall, 2006 Instructor: Prof. T.C. Hu Department of Computer Science and Engineering University of California, San Diego La Jolla, CA 92093-0114 Offi
School: UCSD
Course: Advanced Compilers
CSE 231: Advanced Compilers CSE 231: Advanced Compilers Fall Quarter, 2006 General information Meeting times and location: T-Th 5:00-6:20, location: WLH 2207 Instructor: Sorin Lerner (email: lerner at cs, Office hours: by appointment, email m
School: UCSD
Course: Computer Arithmetic Algorithms And Hardware Design
CSE 246: Computer Arithmetic Algorithms and Hardware Design (Fall 06) Lectures: Tues/Thurs 3:30-4:50PM, Warren Lecture Hall 2110 Office Hours: Tues/Thurs 2:00-3:00PM, CSE2130 Course Instructor: CK Cheng Textbook Computer Arithmetic: Algorithms and H
School: UCSD
Course: Biological Data Analysis
CSE 182 Home Page Fall06: CSE/BIMM/BENG 182: Biological Data Analysis Instructor: Vineet Bafna TA: Julio Ng Lectures: TR 2:00-3:20pm. SOLIS 111 Discussion:M3:00-3:50pm. CENTR201 Office hours: Vineet Bafna: TR 3:30-4:30pm EBU3b(CSE building) 4218 TA
School: UCSD
Course: Introduction To Computer Architecture
CSE 141 - Introduction to Computer Architecture CSE 141 - Introduction to Computer Architecture Fall 2006, Instructor: Dean Tullsen Announcements: Here is the hint sheet I will append to the test. This week's discussion section rescheduled to Wednes
School: UCSD
Course: BIOMETRICS
CSE190A CSE190A Topics in CSE: BIOMETRICS Section Id: 570220, Tuesday, Thursday, 3:30pm - 4:50pm HSS 1138 http:/www.cs.ucsd.edu/classes/fa06/cse190-a/ News: 10/2/06: Project description posted 10/3/06: Confirmed that E-reserves are available at htt
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE 140 Fall 2006 Syllabus CSE 140: Components and Design Techniques for Digital Systems Fall 2006 Syllabus Course Description The objective of this course is to give an introduction to digital logic design. Some topics covered in this class include
School: UCSD
Course: Computer Organization And Systems Programming
CSE 30 Syllabus CSE 30 Syllabus Computer Organization and Systems Programming (Some Assembly Required) Winter 2008 Lectures: Tuesdays &Thursdays 9:30 - 10:50am WLH 2204 Discussion Sections: Mondays: 10:00 - 10:50am - EBU3B 2154 Fridays: 4:00 - 4:50
School: UCSD
Course: Theory Of Computation
CSE 105 - Summer 1999 CSE 105: Theory of Computation - Summer 1999 Instructor Ramamohan Paturi; Office Hours, Wednesdays 12:30-1:30 PM; 4131 AP&M. Lecture Hours Mondays and Wednesdays - 2:00-4:50 PM; Center 212; Class Home Page http:/www-cse.ucsd.ed
School: UCSD
Course: Object Oriented Software Design
CSE 111 - Object Oriented Software Design Announcements The due date for phase 2 of the project is postponed until the day of the final (Thus, Dec 13). Note that your e-materials need to be sent to both the professor and the TA. Instructions for the