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
Lecture 1 Thursday, October 10, 2013 5:05 PM Phishing ("fishing") - an email scam designed to acquire sensitive information from the target. Most successful phishing email are designed to look like an email that comes from a reputable source Computers are
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
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
CSE11 Spring 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
Cse 11 Spring 2015 An introduction to objects Everything is an object Think of an object as a fancy variable It stores data But, you can make requests of an object Drivers license State, name, Date of Birth, Expiry Date, Eyes, Height, DL # Picture,
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 9 Cse11 Spring 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
Lectures 7 & 8 CSE11 Spring 2015 Arrays, Common Operations, ArrayList Some Debugging Tips Arrays A collection of objects, stored that can accessed by an index (also known as a subscript) Example String [] sArray = new String[20]; defines sArray to have
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 6 CSE 11 Spring 2015 Methods From Last Time: Classes Classes are abstractions They help us group actions (methods) and state (data) in sensible ways Well defined classes make it easier to understand and reason about a program A class is a type Alw
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
CSE3 Final study guide Alice 3danimation Class o Allsimilarpropertiesthatperformthatsametask Object o Instanceofclass o Categorizedintoclasses Galleries o Classesareingalleries Savingword o Writing/testanimationinintenseload ALWAYSSAVEONALICE(bestso
School: UCSD
Course: Intro Computer Science Java
CSE8A Lecture2 Check the class web page (and discussion board, linked form webpage) for news and info: https:/sites.google.com/a/eng.ucsd.edu/cse-8a-fall-2014/home Lab starts this week. Discussion started last week. Tutor hours started over the weekend. I
School: UCSD
Course: Intro Computer Science Java
CSE8A Lecture2 Check the class web page (and discussion board, linked form webpage) for news and info: https:/sites.google.com/a/eng.ucsd.edu/cse-8a-fall-2014/home Lab starts this week. Discussion started last week. Tutor hours started over the weekend.
School: UCSD
Course: Intro Computer Science Java
CSE 8A Lecture 17 LAST CLASS! You made it! (Almost ) Just one final exam to go More info in a second, but first, some awesome slideshows! About the Final Like a larger midterm exam Same format but 2-3x as long You will have 3 hours, but we will aim
School: UCSD
Course: Intro Computer Science Java
CSE 8A Lecture 17 LAST CLASS! You made it! (Almost ) Just one final exam to go More info in a second, but first, some awesome slideshows! About the Final Like a larger midterm exam Same format but 2-3x as long You will have 3 hours, but we will aim
School: UCSD
Course: Intro Computer Science Java
CSE 8A Lecture 16 Todays goals: Static methods vs. non-static methods More practice with classes Announcements Lab 9 tomorrow: bring a laptop if you have one! It will be review, but very important Submit your cool slideshows by tonight. We want to
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
Lecture 1 Thursday, October 10, 2013 5:05 PM Phishing ("fishing") - an email scam designed to acquire sensitive information from the target. Most successful phishing email are designed to look like an email that comes from a reputable source Computers are
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: 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
CSE11 Spring 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
Cse 11 Spring 2015 An introduction to objects Everything is an object Think of an object as a fancy variable It stores data But, you can make requests of an object Drivers license State, name, Date of Birth, Expiry Date, Eyes, Height, DL # Picture,
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 9 Cse11 Spring 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
Lectures 7 & 8 CSE11 Spring 2015 Arrays, Common Operations, ArrayList Some Debugging Tips Arrays A collection of objects, stored that can accessed by an index (also known as a subscript) Example String [] sArray = new String[20]; defines sArray to have
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 6 CSE 11 Spring 2015 Methods From Last Time: Classes Classes are abstractions They help us group actions (methods) and state (data) in sensible ways Well defined classes make it easier to understand and reason about a program A class is a type Alw
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE11 Spring 2015 Lecture 3 Making Choices, Indentation A program is a sequence of instructions compute the expression: (x + 2) * 7 1. 2. 3. 4. Enter a number at the keyboard Add 2 to that number multiply the result by 7 print out the final calculation A
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 4 CSE11 Spring 2015 While Loops, For Loops, Break, Continue, Switch Some shorthand operators in java increment/decrement +, - j+ j = j + 1; j - j = j 1; These can before or after the variable name. And it matters in assignment statements; k = j+;
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 2 CSE11 Spring 2015 Outline Compiling and Running Java Applications Primitive Variables/Assignment (ZY:Ch 2) Java Identifiers Naming conventions Working with Numbers Precedence What is a computer program? A sequence of steps (instructions) to per
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 10 CSE11 Spring 2015 Inheritance Software Reuse in Object-Oriented Programming You can write more software if you can make use of existing code This is the basic idea of software reuse Inheritance and Composition are two powerful design pattern
School: UCSD
Course: Intr Computer Sci&obj-orijava
Lecture 13 Generics, Concurrency CSE11 Spring 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
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: Components And Design Techniques For Digital Systems
CSE140: Components and Design Techniques for Digital Systems Midterm #2 Sample Problems Tajana Simunic Rosing 1 Sources: TSR, Katz, Boriello, Vahid, Perkowski Where we are now What we have covered: Combinational and sequential circuits; Zybook chaps 1-5
School: UCSD
Course: Components And Design Techniques For Digital Systems
Timing Constraints in Sequential Designs 63 Sources: TSR, Katz, Boriello & Vahid Where we are now. What we covered last time: FSMs What well do next: Timing constraints Upcoming deadlines: ZyBook today: Sec 5.7-11 HW#5 due next Tuesday Note: we grad
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE140: Digital Logic Design Registers and Counters Prof. Tajana Simunic Rosing 38 Sources: TSR, Katz, Boriello & Vahid Where we are now. What we covered last time: ALUs, SR Latch Latches and FlipFlops (FFs) Registers What well do next FSMs Upcoming d
School: UCSD
Introduction to Probability Russell Impagliazzo and Janine Tiefenbruck February 27, 2015 Todays agenda 1 Discuss applications of probability to computer science and beyond 2 Dene a probability distribution 3 Show how to use conditional probabilities Human
School: UCSD
Counting: Graphs and Sorting Russell Impagliazzo and Janine Tiefenbruck May 15, 2015 Number of Simple Undirected Graphs In a simple undirected graph on n vertices, how many edges are possible? _ How many simple undirected graphs on n vertices are there? _
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 5 April 13th, 2015 Todays
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 10 April 29th, 2015 Today
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 12 May 6th, 2015 What is
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: Software Tools and Techniques Laboratory Spring 2015 - http:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 7 April 20th, 2015 Todays Topics 1. Introduction to shell scripting programming constructs 2. Softwa
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 9 April 27th, 2015 Todays
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 8 April 22nd, 2015 The T
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 6 April 15th, 2015 Todays
School: UCSD
Course: Software Tools&techniques Lab
CSE 15L: So*ware Tools and Techniques Laboratory Spring 2015 - hAp:/cse15spring2015.weebly.com/ Dr. ILKAY ALTINTAS GARY GILLESPIE TA: ALOK SINGH Lecture 11 May 4th, 2015 Todays
School: UCSD
Course: Components And Design Techniques For Digital Systems
CSE140: Components and Design Techniques for Digital Systems Tajana Simunic Rosing 1 Sources: Katz, Boriello & Vahid Sources: TSR, Katz, Boriello & Vahid Midterm Statistics for Sections A & B mean: 86.48 std: 12.80 min: 40 max: 100 Excellent job! Regrade
School: UCSD
Introduction to Counting Russell Impagliazzo and Janine Tiefenbruck May 6, 2014 1 2 3 4 What do we mean by counting? How many arrangements or combinations of objects are there of a given form? How many of these have a certain property? Why is counting imp
School: UCSD
Fixed Density Binary Strings Russell Impagliazzo and Janine Tiefenbruck May 11, 2015 Last Time Question: How many length n binary strings have k ones? Answer: Last Time Question: How many length n binary strings have k ones? Answer: The binomial coefficie
School: UCSD
More Counting Techniques Russell Impagliazzo and Janine Tiefenbruck May 8, 2014 Last Time Sum Rule: For any disjoint sets A and B, |A U B| = |A| + |B|. Product Rule: For any sets A and B, |AxB| = |A|*|B|. Complete Bipartite Graph A complete bipartite grap
School: UCSD
Fixed Density Binary Strings, Continued Russell Impagliazzo and Janine Tiefenbruck May 13, 2015 Last Time We saw an algorithm to encode fixed density binary strings (of length n, with k ones): Use a sliding window of size n/k. Is there a 1 in the window?
School: UCSD
Graph Search and Reachability Russell Impagliazzo and Janine Tiefenbruck May 4, 2015 Tartaglia's Pouring Problem Large cup: contains 8 ounces, can hold more Medium cup: is empty, has 5 ounce capacity Small cup: is empty, has 3 ounce capacity Tartaglia's P
School: UCSD
Puzzles and Graphs Russell Impagliazzo and Janine Tiefenbruck April 20, 2015 What is a graph? A (directed) graph G is A set of vertices V, also called nodes, together with A set of edges E, each pointing from one vertex to another (denoted with an arrow)
School: UCSD
CSE 20: Quiz 4 Total marks: 50 Total Time: 30 minutes 12th March, 2014 Name: PID: 1. (25 Marks) If a0 = 1 and a1 = 1 and for all n 2 an = an1 + an2 then prove that for all n 0, an n. 2. (25 Marks) Prove that for all natural number n if N = 2n then for all
School: UCSD
CSE 20: Quiz 3 Total marks: 50 Total Time: 25 minutes 26th February, 2014 Name: PID: 1. (25 Marks) Prove that n2 > 2n + 1 for all integer n 2. 2. (25 Marks) Prove that for all natural number n, 1 12 + 22 + 32 + + n2 = n(n + 1)(2n + 1) 6
School: UCSD
CSE 20: Quiz 2 Total marks: 50 Total Time: 30 minutes 3rd February, 2014 Name: PID: 1. (20 Marks) Prove that: k, If k is odd then 3k is irrational 2. (6 + 6 + 6 Marks) Express these system specications using the propositions p = The message is scanned for
School: UCSD
CSE 20: Quiz 1 Total marks: 50 Total Time: 30 minutes 17th January, 2014 Name: PID: 1. (15 Marks) Convert [6102]8 to binary. 2. (15 Marks) What is the sum of [24887]9 and [13808]9 in the base 9 representation. 3. (20 Marks) Show that if a and b are intege
School: UCSD
CSE 20 Lecture 16: Midterm Review CSE 20: Lecture 16 Midterm Review Representation of integers in base b Logic Proof systems: Direct Proof Proof by contradiction Contraposetive Sets Theory Functions CSE 20: Lecture 16 Midterm Review Representation of inte
School: UCSD
CSE 20 Lecture 8: Propositional Logic CSE 20: Lecture8 Boolean Algebra CSE 20: Lecture8 Boolean Algebra Boolean Algebra has two basic digit: 1 and 0. CSE 20: Lecture8 Boolean Algebra Boolean Algebra has two basic digit: 1 and 0. One can think of these as
School: UCSD
CSE 20 Lecture 10: Logical Deductions CSE 20: Lecture10 Next Weeks Reading Assignment Section 2 (Predicate Logic) in Unit Lo: Logic. CSE 20: Lecture10 Mathematical Logic Can be used to check whether a statement is logically correct. CSE 20: Lecture10 Math
School: UCSD
CSE 20 Lecture 6: Number Theory (contd.) CSE 20: Lecture 11 Reminder Quiz on Friday, April 18th. Sylabus: Representation of numbers in dierent bases Simple number theory proofs CSE 20: Lecture 11 Problem of last class If a and b are two posetive integers
School: UCSD
CSE 20 Lecture 5: Number Theory CSE 20: Lecture 9 Some Number Theory Notations If a, b are two posetive integers then b divides a if a = bq for some posetive integer q. It is denoted as b | a. CSE 20: Lecture 9 Some Number Theory Notations If a, b are two
School: UCSD
CSE 20 Lecture 3: Representing integers in dierent bases CSE 20: Lecture2 Representation of integers CSE 20: Lecture2 Representation of integers Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 CSE 20: Lecture2 Representation of integers Digits: 0, 1, 2, 3, 4, 5, 6,
School: UCSD
CSE 20 Lecture 4: Number System and Boolean Function CSE 20: Lecture2 Next Weeks Next week we will do Unit:NT, Section 1. There will be an assignment set posted today. It is just for practice. CSE 20: Lecture2 Boolean Functions and Number System CSE 20: L
School: UCSD
CSE 20 Lecture 1: Introduction Instructor: Sourav Chakraborty Sourav Chakraborty CSE 20: Lecture1 TAs and Tutors and Website Instructor: Sourav Chakraborty (chakraborty.sourav@gmail.com) TAs and Tutors: Will be announced next class Course Website: http:/c
School: UCSD
CSE 20 Lecture 2: Representing integers in dierent bases CSE 20: Lecture2 TAs and Tutors and Website Instructor: Sourav Chakraborty (chakraborty.sourav@gmail.com) Course Website: http:/cseweb.ucsd.edu/classes/sp14/cse20-a/ CSE 20: Lecture2 Classes Lecture
School: UCSD
Puzzles and Graphs Russell Impagliazzo and Janine Tiefenbruck April 20, 2015 What is a graph? A (directed) graph G is A set of vertices V, also called nodes, together with A set of edges E, each pointing from one vertex to another (denoted with an arrow)
School: UCSD
Graphs and Euler Tours Russell Impagliazzo and Janine Tiefenbruck April 24, 2015 Tartaglia's Pouring Problem Large cup: contains 8 ounces, can hold more Medium cup: is empty, has 5 ounce capacity Small cup: is empty, has 3 ounce capacity Tartaglia's Pouri
School: UCSD
Euler Tours and Fleury's Algorithm Russell Impagliazzo and Janine Tiefenbruck April 27, 2015 Euler Tours Remember, a path is a route through the graph: p =( v0 , e1 , v1 , e2 , v2 , e3 , . . . , ek , vk) An Euler tour is a path that uses each edge exactly
School: UCSD
Course: Intro Computer Science Java
CSE8A: Introduction to Programming in Java Fall 2014 Peter F. Klemperer https:/sites.google.com/a/eng.ucsd.edu/cse-8a-fall-2014/home What is Computer Science? 1. What exactly is computer science, and where do you see evidence of Computer Science in the wo
School: UCSD
Course: Intro Computer Science Java
CSE8A Lecture 5: Announcements PSA2 posted PSA0 grades coming soon. Be sure to follow regrade instructions which will be posted on Piazza (summarycontact your grader) Midterm 1 in ONE WEEK! Format: similar to review quiz/clicker questions/PSAs Some MC,
School: UCSD
Course: Intro Computer Science Java
CSE8A Lecture 7: Announcements PSA2 due tonight. No more exceptions for late submissions/nonsubmissions. You MUST hit submit! Midterm 1 in Thursday in class! No reading or reading quiz on Thursday Just bring your ID and your pencil and eraser or your pe
School: UCSD
Course: Intro Computer Science Java
CSE8A Lecture 7: Announcements PSA3 due tonight. For regrade requests: Contact your grader. If you dont know who your grader is because you didnt get assigned one, email Rahul Balerao for PSA1 (rbhalera@eng.ucsd.edu) or Pooja Naik for PSA2 (panaik@eng.ucs
School: UCSD
Course: Intro Computer Science Java
CSE8A Lecture3: THE HARDEST CONCEPT OF THE QUARTER! (Variable assignment, primitives and references) TO DO: Submit PSA1 if you havent yet. You will be charged a slip day, but thats OK! You still have one left. Get an interview individually (B220) Advic
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
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
CSE 21 Practice Exam for Midterm 2 Spring, 2015 1. Representing Problems as Graphs I have $10, and I plan to spend some or all of my money on three types of candy, which I will buy one piece at a time: chocolate bars cost $3, almond rocca cost $2, and
School: UCSD
Trees: Unrooted, Rooted, and as Data Structures Russell Impagliazzo and Janine Tiefenbruck May 1, 2015 Family trees An example of a tree diagram in common use is the family tree, tracing a persons descendents through the generations. Rooted Trees In compu
School: UCSD
CSE 20: Quiz 5 - Section B Total marks: 50 Total Time: 40 minutes 2nd June, 2014 Name: PID: 1. (25 Marks) Prove that n2 4n + 5 for all integer n 5. 2. (25 Marks) Let cfw_an be a sequence of natural numbers such that a1 = 5, a2 = 13 and an+2 = 5an+1 6an f
School: UCSD
CSE 20: Quiz 2a Total marks: 50 Total Time: 30 minutes 25th April, 2014 Name: PID: 1. (5 + 15 Marks) (a) If a and b are two rational numbers then prove that ab is also rational. (b) If a is a rational number and b is not a rational number prove that ab ca
School: UCSD
CSE 20: Quiz 1b Total marks: 50 Total Time: 30 minutes 18th April, 2014 Name: PID: 1. (15 Marks) Convert [31021]4 to base 5. 2. (15 Marks) What is the sum of [24665]7 and [63606]7 in the base 7 representation. 3. (10 Marks) What is the maximum integer tha
School: UCSD
CSE 20: Quiz 3b Total marks: 50 Total Time: 30 minutes 2nd May, 2014 Name: PID: 1. (15 + 5 Marks) (a) Prove that the following expressions are equivalent: i. p (q r) (p q) r ii. (p r) q (b) If the above propositions are TRUE and p is TRUE and q is FALSE t
School: UCSD
CSE 20: Quiz 1a Total marks: 50 Total Time: 30 minutes 18th April, 2014 Name: PID: 1. (10 Marks) Convert [6102]8 to base 3. 2. (10 Marks) What is the sum of [24777]8 and [63606]8 in the base 8 representation. 3. (10 Marks) What is the maximum integer that
School: UCSD
3rd Discussion Section: Midterm #1 Review CSE 141 - Intro. to Computer Architecture 4/20/2015 Reminders Midterm #1 on Tuesday 4/21 (in class). Recall grade breakdown: 20% Midterm 1 (4/21). 30% Midterm 2 (5/19). 30% Final (6/9). 10% Quizzes. 10% Home
School: UCSD
Prof. Taylors CSE 141 Spring 2015 Midterm Exam Solutions Architect (your name here): _ General Instructions To receive full credit, write your answers as neatly as you can. Show your work. You may be wrong, but you could get partial credit. Be succinct bu
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: 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: Intr Computer Sci&obj-orijava
CSE 11 Spring 2015 Program Assignment #3 (100 points) START EARLY! Due: 24 April 2015 at 1159pm (2359, Pacific Standard Time) PROGRAM #3 : ArrayPlay READ THE ENTIRE ASSIGNMENT BEFORE STARTING In lecture, we described several common operations that can be
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Spring 2015 Program Assignment #4 (100 points) START EARLY! Due: 1 May 2014 at 1159pm (2359, Pacific Standard Time) PROGRAM #4 : AsciiArt READ THE ENTIRE ASSIGNMENT BEFORE STARTING In lecture weve discussed multidimensional arrays and ArrayList. In
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Spring 2015 Program Assignment #2 (100 points) START EARLY! Due: 17 April 2015 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 the
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Spring 2015 Programming Assignment #1 START EARLY! 100 Pts Due: 10 April 2015 at 11:59pm (2359) Covers Chapters: ZY 1-3 This is a combination of a programming assignment and ungraded exercises Exercises are optional, not graded. Exercise #1: Make c
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Spring 2015 Program Assignment #5 (100 points) Due: 15 May 2015 at 1159pm (2359, Pacific Daylight Time) START EARLY! PROGRAM #5 : Cryptor READ THE ENTIRE ASSIGNMENT BEFORE STARTING The program focuses on using inheritance, abstract classes, handlin
School: UCSD
Course: Intr Computer Sci&obj-orijava
CSE 11 Winter 2015 START EARLY! Program Assignment #5 (100 points) Due: 23 May 2015 at 1159pm (2359, Pacific Standard Time) SATURDAY! PROGRAM #6 : BlockGrid READ THE ENTIRE ASSIGNMENT BEFORE STARTING The program focuses on using java Swing and Threads. Yo
School: UCSD
Course: Components And Design Techniques For Digital Systems
Homework#5 CSE140Spring2015 Prof.TajanaSimunicRosing 1. Awristwatchdisplaycanshowoneoffouritems:time,alarm,stopwatchordate, controlledbytwosignalss1ands0:00fortime,01foralarm,10forstopwatchand11 fordate.Assumes1ands0controlanNbitMUXthatpassesthroughtheapp
School: UCSD
Homework 7 CSE 21 Spring 2015 Due by 5pm, Wednesday, May 27 on TED Before beginning this homework, please review the policies regarding group-based homework, online submission of homework, and academic integrity, all of which are available on the syllabus
School: UCSD
Course: Components And Design Techniques For Digital Systems
Homework#4 CSE140Spring2015 Prof.TajanaSimunicRosing 1. DesignanALUwithtwo8bitinputsAandB,andcontrolinputsx,yandz.TheALU shouldsupporttheoperationsdescribedinthetablebelow.Youmayusean8bit adderandaminimumnumberofotherelements. Inputs x y z Operation 0 0 0
School: UCSD
Homework 5 CSE 21 Spring 2015 Due by 5pm, Friday, May 8 on Ted Before beginning this homework, please review the policies regarding group-based homework, online submission of homework, and academic integrity, all of which are available on the syllabus. Re
School: UCSD
Homework 6 CSE 21 Spring 2015 Due by 5pm, Friday, May 15 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. Re
School: UCSD
Homework 4 CSE 21 Spring 2015 Due by 5pm, Friday, May 1 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. Rem
School: UCSD
CSE 20: Assignment Set 6 1. Let x > 1 be a real number. Prove that (1 + x)n 1 + nx for all natural numbers n. 2. Prove that n i=1 i i! = (n + 1)! 1, for all posetive integers n. 3. Let cfw_an be a sequence of natural numbers such that a1 = 5, a2 = 13 an
School: UCSD
CSE 20: Assignment Set 5 1. If A and B are two sets such that |A| = 8 and |B | = 9 then can |A B | be equal to 10. Explain your answer. 2. If A and B are two sets such that |A| = 8 and |B | = 9 and |A B | = 15 then what is |A B . 3. If S = cfw_0, 1 and T
School: UCSD
CSE 20: Assignment Set 4 1. Prove that proving (A = B ) is same as proving (B = A). 2. Is the statement form (p q ) (p (p q ) a tautology or a contradiction or none. 3. Let D = cfw_48, 14, 8, 0, 1, 3, 16, 23, 26, 32, 36. Determine which of the following s
School: UCSD
CSE 20: Assignment Set 2 1. Convert the following as indicated. (a) Convert [61502]8 to decimal. (b) Convert [55555]6 to octal. (c) Convert [22233]10 to binary (d) Convert [54545]7 to base 6. 2. Add [11111111]2 + [1]2 and convert the result to decimal rep
School: UCSD
CSE 20: Assignment Set 3 1. Let r = she registered to vote and v = she voted. Write the following statement in symbolic form: She registered to vote but she did not vote. 2. Make a truth table for (p ( p q ) (q r) 3. Using DeMorgans rule, state the negati
School: UCSD
CSE 20: Assignment Set 1 1. Write down the following integers in base 7: (a) 245 (b) 98 (c) 2014 2. What is the representation of the number [2402]5 in base 2? 3. What is [111111]2 + [1]2 ? 4. What is [32132]4 + [22]4 ? 5. Let n be an integer. Let the rem
School: UCSD
CSE 20: Assignment Set 2 1. Show that a2 + a4 0(mod 5) if a 2(mod 5) or a 3(mod 5) or if 5 divides a. 2. Let x be an integer. Prove that if x2 6x + 5 is even then x must be odd. 3. Show that for any posetive number a and b, a+b ab. 2 4. If a is an odd i
School: UCSD
CSE 20: Assignment Set 3 1. Let r = she registered to vote and v = she voted. Write the following statement in symbolic form: She registered to vote but she did not vote. 2. Make a truth table for (p ( p q) (q r) 3. Using DeMorgans rule, state the negatio
School: UCSD
Homework 2 Solutions Devin Platt Problem 1: BubbleSort and RevisedBubbleSort Part A BubbleSort makes 1 + 2 + + (n 1) = (n1)n 2 comparisons. Part B Same as Part A, (n1)n comparisons. For this particular algorithm (BubbleSort) 2 the number of comparisons is
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
Homework 3 Solutions Problem 1: Proving an Asymptotic Property We want to prove that f (n) (g(n) = (f (n)2 (g(n)2 ) Recall from the denition of big omega that there exist d and N such that for all n > N f (n) dg(n) Using the fact that both f (n) and g(n)
School: UCSD
Homework 4 Solutions Problem 1: Writing Recurrence Relations Part A P (1) = 2 P (n) = P (n 1) + 2 Part B T (2) = 1 T (n) = (n 1) + T (n 1) OR T (1) = 0 T (n) = (n 1) + T (n 1) Part C T (1) = 0 T (2) = 2 T (n) = 2T (n 2) OR T (n) = 0 if n is odd T (2) = 2,
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: 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
CSE3 Final study guide Alice 3danimation Class o Allsimilarpropertiesthatperformthatsametask Object o Instanceofclass o Categorizedintoclasses Galleries o Classesareingalleries Savingword o Writing/testanimationinintenseload ALWAYSSAVEONALICE(bestso
School: UCSD
Course: Intro Computer Science Java
CSE8A Lecture2 Check the class web page (and discussion board, linked form webpage) for news and info: https:/sites.google.com/a/eng.ucsd.edu/cse-8a-fall-2014/home Lab starts this week. Discussion started last week. Tutor hours started over the weekend. I
School: UCSD
Course: Intro Computer Science Java
CSE8A Lecture2 Check the class web page (and discussion board, linked form webpage) for news and info: https:/sites.google.com/a/eng.ucsd.edu/cse-8a-fall-2014/home Lab starts this week. Discussion started last week. Tutor hours started over the weekend.
School: UCSD
Course: Intro Computer Science Java
CSE 8A Lecture 17 LAST CLASS! You made it! (Almost ) Just one final exam to go More info in a second, but first, some awesome slideshows! About the Final Like a larger midterm exam Same format but 2-3x as long You will have 3 hours, but we will aim
School: UCSD
Course: Intro Computer Science Java
CSE 8A Lecture 17 LAST CLASS! You made it! (Almost ) Just one final exam to go More info in a second, but first, some awesome slideshows! About the Final Like a larger midterm exam Same format but 2-3x as long You will have 3 hours, but we will aim
School: UCSD
Course: Intro Computer Science Java
CSE 8A Lecture 16 Todays goals: Static methods vs. non-static methods More practice with classes Announcements Lab 9 tomorrow: bring a laptop if you have one! It will be review, but very important Submit your cool slideshows by tonight. We want to
School: UCSD
Course: Intro Computer Science Java
CSE 8A Lecture 15 Todays goals: Static methods vs. non-static methods More practice with classes Announcements Lab 9 tomorrow: bring a laptop if you have one! It will be review, but very important A redesign of the Species class This idea that the
School: UCSD
MIPS32 Instruction Set Quick Reference LOGICAL AND BIT-FIELD OPERATIONS DOTTED DESTINATION REGISTER SOURCE OPERAND REGISTERS RETURN ADDRESS REGISTER (R31) PROGRAM COUNTER 64-BIT ACCUMULATOR ACCUMULATOR LOW (ACC31:0) AND HIGH (ACC 63:32) PARTS SIGNED OPERA
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
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