Monday, November 30, 2015

Path-relaxation property - If p = {v0, v1, ..., vk) is a shortest path from s = v0 to vk, and we relax the edges of p in the order (v0, v1), (v1, v2), ..., (vk-1, vk), then vk.d = f(s, vk). This property holds regardless of any other relaxation steps that occur, even if they are intermixed with relaxations of the edges of p.

Let us consider we have a graph with 5 vertices and 8 edges. Relaxations are as follows (we set the source as vertex 0 from where we have to find the shortest path to all other vertices):

Let us say

The shortest path from Vertex 0 to Vertex 1 needs relaxations in the order E2 E4 E1 E0
The shortest path from Vertex 0 to Vertex 2 needs relaxations in the order E3 E8 E6

The shortest path from Vertex 0 to Vertex 3 needs relaxations in the order E2 E0 E8

The shortest path from Vertex 0 to Vertex 4 needs relaxations in the order E3 E1

The Problem - Parallel job scheduling - Given a set of jobs with durations and precedence
constraints, schedule the jobs (by finding a start time for each) so as to
achieve the minimum completion time, while respecting the constraints.

JobID Duration (current job must complete before these jobIDs)0 41.0 1 7 91 51.0 22 50.03 36.04 38.05 45.06 21.0 3 87 32.0 3 88 32.0 29 29.0 4 6
We construct a directed graph for this problem (it needs to be acyclic otherwise the constrians would be impossible to satisfy. If job1 requires job2 to be done, job2 must not require job1 to be done before it). We use topological sort but reverse the edge weights so that the spanning tree gives the length of the longest path from source to any other vertex (maximum work is ensured to be done before another job is taken).

Each node represents a job. There are two additional source and sink nodes. The source has edges to all other job nodes with 0 weights. All job nodes have edges terminating on sink nodes with weights that are required to complete that particular job. Topological sort results are stored in edgeTo[] parent link array to reconstruct the spanning tree. The results are then extracted.

edgeTo contents -> [10, 0, 8, 6, 9, 10, 9, 0, 6, 0, 0, 2]
Results:
At time (-0.0) transition from Start to 0
At time (-0.0) transition from Start to 5
At time (41.0) transition from 0 to 1
At time (41.0) transition from 0 to 7
At time (41.0) transition from 0 to 9
At time (70.0) transition from 9 to 4
At time (70.0) transition from 9 to 6
At time (91.0) transition from 6 to 3
At time (91.0) transition from 6 to 8
At time (123.0) transition from 8 to 2

Sunday, November 29, 2015

This program finds the shortest paths to all vertices from a given source vertex.

The algorithm is based on first topologically sorting the vertices and then using
the topological order for relaxing edges connected to the current vertex in the order
until the last vertex is done. The result is the shortest distances from the source
vertex to all other vertices.

The delta rule uses gradient descent to approximate the target function. It is guaranteed to converge even if the function is not linearly separable, unlike the perceptron learning rule.

We'll be training the perceptron to learn the boolean AND function. We'll use two weights w1, w2. These weights are approximated by the delta rule to fit the training examples most closely. Next we need to find the threshold value (w0) which we will use to classify the training examples accurately.

Site : http://www.w3.org
Site : http://www.google.com
Site : http://www.codebytes.in
Site : https://www.blogger.com
Site : http://google
Site : http://schema.org
Site : https://plus.google.com
Site : http://2.bp.blogspot.com
Site : https://apis.google.com
Site : http://www.webplatform.org
Site : https://www.edx.org
Site : http://www.w3devcampus.com
Site : http://testthewebforward.org
Site : https://www.w3.org
Site : https://github.com
Site : https://www.ldc.upenn.edu
Site : http://devvar.org
Site : http://www.industryofthingsworldusa.com
Site : http://webaudio.gatech.edu
Site : http://www2016.ca
Site : http://validator.w3.org
Site : http://jigsaw.w3.org
Site : http://vimeo.com
Site : http://www.fundaciononce.es
Site : http://lists.w3.org
Site : http://twitter.com
Site : http://www.csail.mit.edu
Site : http://www.ercim.eu
Site : http://www.keio.ac.jp
Site : http://ev.buaa.edu.cn
Site : http://www.google.co.in
Site : https://play.google.com
Site : http://www.youtube.com
Site : http://news.google.co.in
Site : https://mail.google.com
Site : https://drive.google.com
Site : https://www.google.co.in
Site : https://accounts.google.com
Site : https://ssl.gstatic.com
Site : https://support.google.com
Site : https://www.google.com

IOException for URL : http://google

Site : http://github.com
Site : http://blog.schema.org

IOException for URL : http://2.bp.blogspot.com

IOException for URL : https://apis.google.com

Site : http://docs.webplatform.org
Site : http://en.wikipedia.org
Site : http://blog.webplatform.org
Site : https://twitter.com
Site : https://www.facebook.com
Site : http://webchat.freenode.net
Site : http://richard.esplins.org
Site : https://developers.google.com
Site : http://5by5.tv
Site : https://stats.webplatform.org

IOException for URL : https://www.edx.org

Site : http://yoast.com
Site : http://wp.me
Site : http://wordpress.org
Site : http://www.linkedin.com
Site : https://classroom.w3devcampus.com
Site : http://classroom.w3devcampus.com
Site : http://w3cshop.spreadshirt.net
Site : http://eepurl.com
Site : http://ssl.gstatic.com
Site : https://t.co
Site : http://stats.wordpress.com
Site : http://ogp.me
Site : https://assets
Site : https://api.github.com
Site : https://enterprise.github.com
Site : https://help.github.com
Site : https://desktop.github.com
Site : https://status.github.com
Site : https://developer.github.com
Site : https://training.github.com
Site : https://shop.github.com
Site : http://purl.org
Site : http://xmlns.com
Site : http://rdfs.org
Site : http://drupal.org
Site : http://ldc
Site : https://www.youtube.com
Site : http://www.upenn.edu
Site : http://catalog.ldc.upenn.edu
Site : https://catalog.ldc.upenn.edu
Site : http://www.ldc.upenn.edu
Site : https://ssl
Site : http://www
Site : https://freenode.net
Site : http://www.brownbaglunch.fr
Site : http://clermontech.org
Site : http://www.meetup.com
Site : http://afpyro.afpy.org
Site : http://www.aperoweb.fr
Site : http://www.lacantine
Site : http://www.43117.tl
Site : http://toulonux.org
Site : http://gullivar.org
Site : http://tedxtoulon.com
Site : http://e1
Site : http://fonts.googleapis.com
Site : http://html5shiv.googlecode.com
Site : https://www.linkedin.com
Site : https://www.xing.com
Site : http://www.deliveryofthingsworld.com
Site : http://www.securityofthingsworld.com
Site : http://www.industryofthingsworld.com
Site : http://www.we
Site : http://www.facebook.com