Skip to content

This assignment was part of Foundations of Data Engineering

Notifications You must be signed in to change notification settings

agarwala95/Bacon-Number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bacon-Number

Task

In this project, we revisit the calculation of the Bacon-Number. Only this time, we do not only care for the distance of Kevin Bacon to everyone else, but for the shortest chain length between any two given actors. Write a program that uses a given file playedin of csv entries with these columns:

  1. actor id (integer)
  2. movie id (integer)

The integer values form a dense range starting from 0 to the number of elements enumerated. Based on this graph and two actor ids, your program must compute the length of the shortest coworking chain between two actors. Chains are built of actors that acted in the same movie. For example if Kevin Bacon and Dustin Hoffman worked on the same movie, the chain length between them is 1. If Dustin Hoffman then worked with Barbra Streisand, but Barbra Streisand did not work with Kevin Bacon, the shortest chain length is 2. This extends to arbitrary chain lengths. If no chain can be found, your program should return -1. The chain length from an actor to himself is defined to be 0.

About

This assignment was part of Foundations of Data Engineering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published