Month: October 2015

Parallel Computing and Dijkstra's Algorithm

Department of Computer Science Intro to Parallel Computing
Programming Assignment 3
Due Wednesday, October 28 at 6 pm
Dijkstra’s Algorithm
Edsger Dijkstra was a Dutch computer scientist. He is unquestionably one of the found-
ing fathers of computer science. In addition to devising Dijkstra’s algorithm, he was one
of the originators of structured programming | a precursor to modern object-oriented pro-
gramming. C, for example, is a structured programming language. He also made many
contributions to the solution of process-coordination problems in parallel computing: we’ll
learn about several later on in the course. His Wikipedia page lists more than fty funda-
mental contributions to computer science.
Dijkstra’s algorithm solves the single-source shortest path problem” in a weighted, di-
rected graph. The input consists of a weighted, directed graph and a speci ed vertex in the
graph. A directed graph or digraph is a collection of vertices and directed edges, which join
one vertex to another. A weighted dig

Chat Server

Chat Server – Part 1
l Due 2015-11-22 at 11:59pm.
l This is a team project. Each team can have at most two
students.
l Each class that you write in this project should contain
each team member’s name, email, lab section, and date at
the top of the file in the class javadoc.
l Only one team member needs to submit to webcat.
The person who submits should choose the other person as
partner during the submission process. If both team
members submit then the team will eventually get a 0.
Prerequisites
1. String Manipulation & Parsing
2. Member Methods and Variables
3. Input Validation
4. Using Fixed Size Arrays
5. Designing Classes
Learning Objectives
1. Basic Server Operations
2. Understanding a Protocol
3. Session Cookies
4. Measuring Time in Java
5. Circular Arrays
6. Teamwork
Teamwork Advice
If this is your first programming team project then the following information might be useful.
l Each team member should read the handout on her own and write down the important
requirements for each class in her own w

Raspberry Pi電腦板

CSE30 – HW #2
Part I – Due Monday Oct 26, 2015 by 11:30pm
Part II – Due Monday Nov 2, 2015 by 11:30 pm
Introduction
This is an assignment in two parts. In the first part you are given more
practice with GDB, the GNU Project Debugger and a lot of practice with
pointers by writing C code that uses them heavily. You will also make your
first venture into Assembly.
The second part of the assignment focusses on translating your C code
to Assembly. After completing the assignment you should know many of the
important ARM instructions (particularly those that interact with memory)
and understand what goes on under the hood of your C program.
Please note that part II is due one week after the due date of part I.
This assignment is subject to the style guidelines posted on the course
site:
https://cseweb.ucsd.edu/classes/fa15/cse30/hw/style.pdf.
All parts of this assignment should be completed and tested on
the Raspberry Pi.
1
Part I
1 GDB: More debugging practice
GDB allows you to inspect and modify the program as it

Battleship Recursion

CSCI-1200 Data Structures | Fall 2015
Homework 6 | Battleship Recursion
In this homework we will solve ship placement puzzles inspired by the pencil & paper Battleship” game that
was later made into a board game by Milton Bradley and then a puzzle that is a regular feature in Games
magazine. You can read more about the history of the game and see examples here:
https://en.wikipedia.org/wiki/Battleship_(game)
https://en.wikipedia.org/wiki/Battleship_(puzzle)
This is a popular game with lots of material available online. You may not search for, study, or use any code
related to the Battleship game or puzzle. Please carefully read the entire assignment and study the examples
before beginning your implementation.

Inter-Process Communication Engines

Inter-Process Communication Engines

1. Objective
Lab 2 is designed to help you understand how to use IPC mechanisms to support communications
between two processes. In the class you have learned Pipe, RPC, Socket, Shared Memory, and Signal. In
this lab, you will practice three different IPC mechanisms: Unix Socket, System V Shm and Posix Shm to
enable processes to send/receive messages.
2. Background
This section introduces the context of the lab and gives you an idea of why and when you would need to
do this type of task.
When system software engineers in industry build backend server systems (e.g., in big cloud or large
data centers), they often start and run m communication-driver processes and n application processes
on the server, where m <= n. The driver process receives requests from a great number of clients, and
then sends them to the application process to process. Note that here the driver process and the
application process are on the same machine. To implement this step, you need an inter-pro

CSE320 Fall 2015 – Homework 4

CSE320 Fall 2015 – Homework 4
Due Friday 10/30/2015 @ 11:59pm
Introduction
The goal of this assignment is to become f amiliar with low-level Unix/POSIX system calls related to
process and job control, f ile access, and IPC (pipes and redirection). You will write a mini-shell with basic
operations (a small subset of Bash’s f unctionality). Expected length of this C program is 1000-2000
lines of code (not very long, but the code will be challenging, so start early).
Takeaways
Af ter completing this homework you should:
Understand process execution, pipes, and f orks
Enhance your understanding of *nix commands and the command line
Working with existing C libraries and system calls
Enhance your C programming abilities
Working with a partner
You are allowed to have groups of up to two members f or the remaining assignments. If you wish to
have a partner you must email cse320@cs.stonybrook.edu. The email should have the subject:
<标题> [CSE320] Group Formation . The contents of the email should contain the f ollowing inf

Linked lists #2

Goals

This assignment extends your work on with linked lists, but also includes an extra focus on algorithmic complexity. The goals are as follows:

  1. Learn how to keep data separate from containers
  2. Practice designing algorithms and data structures
  3. Practice using code that uses the following:
    1. linked lists
    2. structures for data encapsulation
    3. dynamic memory (i.e., malloc)
    4. struct initializer syntax (C99)
  4. Learn how analyze the complexity of algorithms

Simple TCP like transport layer protocol

CSEE 4119: Computer Networks, Fall 2015
Programming Assignment 2: Simple TCP like?transport ?layer?protocol
Due Friday, November 6 th 11:55 pm
Academic Honesty Policy
You are permitted and encouraged to help each other through Piazza’s web board. This only
means that you can discuss and understand concepts learnt in class. However, you may NOT
share source code or hard copies of source code. Refrain from sharing any material that could
cause your source code to APPEAR TO BE similar to another student’s source code enrolled
in this or previous years. Refrain from getting any code off the Internet. Cheating will be
dealt with severely. Cheaters will be penalized. Source code should be yours and yours only.
Do not cheat.
1. Introduction
In this programming assignment, you will implement a simplified TCPlike
transport layer
protocol. Your protocol should provide reliable, in order delivery of a stream of bytes. It
should recover from innetwork
packet loss, packet corruption, packet duplication and packet
reorderi

64bitAdd

Due: Smartsite Wed., 4/29, 11:55 p.m.
Names of Files to Submit: 64bitAdd.s, editDist.s , div.c, divAssembly.s,
ReadMe.txt
? If you are working in a group ALL members must submit the assignment
? All programs should compile with no warnings when compiled with the -Wall option
? All prompts for input and all output must match my prompts/output. We use a program to grade
your work and tiny differences can cause your work to be marked as a 0.
? The best way to avoid being deducted points is to copy the prompt/unchanging portion of
the outputs into your code. Make sure to get the spaces as well.
? You must also submit a file called ReadMe.txt. Include the names of all partners and any
trouble you had on the assignment
? An example ReadMe.txt has been included with this assignment
? The input in the examples has been underlined to help you figure out what is input and what is
output
? Submit your work on Smartsite by uploading each file separately. Do not upload any folders or
<标题> compressed files such as .rar, .tar, .

Stable marriage problem v1

MIE250: Fundamentals of object oriented programming
University of Toronto
Prof. Aleman
aleman@mie.utoronto.ca
Project 3: Stable marriage problem v1
Contents
1 The stable marriage problem (SMP) 1
1.1 A simple example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 SMP applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Program description 3
2.1 Students . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Schools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Menu options 4
4 Error messages 5
5 Required elements 5
5.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5.2 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .