Giter Site home page Giter Site logo
  • ahmed-rashed / ferreiracodes_improved

    spring-analysis, Improved version of the codes accompanying the book "A. J. M. Ferreira, MATLAB Codes for Finite Element Analysis: Solids and Structures, Springer, 2008"

    From user ahmed-rashed

  • ecn431 / 2018

    spring-analysis, Course material for ECN431 "Applied Data Analysis for Firm Strategy and Competition" given at the Norwegian School of Economics (NHH) during the spring semester of 2018.

    From organization ecn431

  • fazeelkhalid / design-and-analysis-of-algorithms--spring-2021-assignment-3

    spring-analysis, Problem 1 Suppose you want to place bill boards to advertise about your new business on the roads of your city. The idea is to place billboards only on the junctions to get maximum visibility as lots of people pass through those junctions. Placing a bill board cost you X Rs. You want to place these bill boards such that each road of the city is covered (i.e. one board must be placed at least to one of the junctions connecting that road). Your objective is to place the boards such that all roads are covered with minimum cost. Being a computer science expert, you model the road network as a graph where roads are edges and junctions are vertices. One of your friends asks you to apply greedy approach to minimize your cost. He asks you to place a board on the junction/vertex that has maximum degree (this way maximum number of roads will be covered) and then place the next board on the junction/vertex that has maximum uncovered roads. Keep doing this until all roads are covered. Is this greedy strategy optimal? If yes then give an informal correctness proof. Otherwise give a counter example. Problem 2 You are recently appointed as an intern of company ABC for n weeks. You team lead has assigned you n tasks t1, t2, t3, ... , tn. You have to submit one task every week but you can do these tasks in any order. Each task i requires hi hours to complete (h1 hours for task t1, h2 hours for task t2 and so on). If you submit task ti on week j then you will be paid hi*(n-j)$. You want to maximize your earning. Give a greedy algorithm that can determine the order in which you should perform the tasks to maximize your income. Give n informal proof of correctness for you algorithm. Problem 3 We use Huffman's algorithm to obtain an encoding of alphabet {a, b, c} with frequencies fa, fb, fc. In each of the following cases, either give an example of frequencies (fa; fb; fc) that would yield the specified code, or explain why the code cannot possibly be obtained (no matter what the frequencies are). (a) Code: {0, 10, 11} (b) Code: {0, 1, 00} (c) Code: {10, 01, 00} Problem 4 Ternary Huffman. Trimedia Disks Inc. has developed ternary hard disks. Each cell on a disk can now store values 0, 1, or 2 (instead of just 0 or 1). To take advantage of this new technology, we need a modified Huffman algorithm for compressing sequences of characters from an alphabet of size n, where the characters occur with known frequencies f1, f2, ..., fn. Your algorithm should encode each character with a variable-length code word over the values 0, 1, 2 such that no code word is a prefix of another code word and so as to obtain the maximum possible compression. a. Design an algorithm for finding optimal code. b. Analyze the running time of your algorithm as a function of n, the number of unique characters. c. Prove that your algorithm works (Give informal argument).

    From user fazeelkhalid

  • fazeelkhalid / design-and-analysis-of-algorithms--spring-2021-assignment-4

    spring-analysis, Problem 1 The spread of third wave of COVID-19 in Pakistan has resulted in closure of academic Institutes. The management of FAST Lahore decided to save your academic year by conducting online sessions (video lectures). There are total n videos that need to be streamed one after the other. Each video vi consists of bi bits that needs to be sent at a constant rate over a period of ti seconds. There is only one connection allowed so two videos can’t be sent at a time. This means scheduling of videos is required (an order in which to send these videos). Whichever order is chosen, there cannot be any delays between the end of one video and the start of the next. The connection does not want its user taking up too much bandwidth, so it imposes the following constraint, using a fixed parameter r: For each natural number t > 0, the total number of bits you send over the time interval from 0 to t cannot exceed r*t. A schedule is considered valid if it satisfies the constraint imposed by the connection. You are a computer science expert and management of FAST need your services. Given a set of n video streams specified by its number of bits bi and its time duration ti, they need to determine whether there exists a valid schedule that satisfies connection parameter r. For example you have 3 videos with (b1,t1)=(2000,1), (b2,t2)=(6000,2) and (b3,t3)=(2000,1) also r=5000. The schedule that runs videos in order 1, 2, 3, is valid because at time t=1 the first stream is sent and 2000 < 5000*1 at time t=2 2000+3000(half of second video)<5000*2 similar calculation can be done to check the constraint for t=3 and t=4. a. Design an efficient algorithm that takes a set of n streams each specified by bi and ti along with r and determines whether a valid schedule exists or not. b. Analyze the running time of your algorithm as a function of n. c. Prove that your algorithm works (Give informal argument). Problem 2 Suppose that instead of always selecting the first activity to finish, we instead select the last activity to start that is compatible with all previously selected activities. Describe how this approach is a greedy algorithm, and prove that it yields an optimal solution. Problem 3 Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in any lecture hall. We wish to schedule all the activities using as few lecture halls as possible. Give an efficient greedy algorithm to determine which activity should use which lecture hall. Problem 4 Alice wants to throw a party and is deciding whom to call. She has n people to choose from, and she has made up a list of which pairs of these people know each other. She wants to pick as many people as possible, subject to two constraints: at the party, each person should have at least five other people whom they know and five other people whom they don't know. Give an efficient algorithm that takes as input the list of n people and the list of pairs who know each other and outputs the best choice of party invitees. Give the running time in terms of n.

    From user fazeelkhalid

  • loveincode / cemap

    spring-analysis, 🎓 记录渣代码大学毕设【College employment management and analysis platform】 SpringMVC + Spring + Hibernate + SpringSecurity 项目 echarts h+前端框架 ligerUI

    From user loveincode

  • maemresen / android-keylogger

    spring-analysis, This GitHub repository contains a basic keylogger implementation with an Android Java frontend and a Spring Boot backend. The keylogger captures user keyboard input and sends it to the backend for analysis.

    From user maemresen

  • yhrtsai / m368k_s2018

    spring-analysis, This directory contains lecture notes for an undergraduate numerical analysis course offered in Spring 2018, at UT Austin.

    From user yhrtsai

  • zmyzheng / tweetmap

    spring-analysis, A real time Tweet Trend Map and Sentiment Analysis web application with kafka, Angular, Spring Boot, Flink, Elasticsearch, Kibana, Docker and Kubernetes deployed on the cloud

    From user zmyzheng

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.