POV-Ray : Newsgroups : povray.off-topic : Representing satisfiability in SQL relations : Re: Representing satisfiability in SQL relations Server Time
3 Sep 2024 23:30:20 EDT (-0400)
  Re: Representing satisfiability in SQL relations  
From: Warp
Date: 24 Jun 2010 15:48:22
Message: <4c23b686@news.povray.org>
Completely unrelated to what you wrote, but it reminded me of something
I wondered some time ago:

  Assume you have a table with movie names and another with actor names,
and a relationship between the two telling which actors have acted in which
movies.

  Problem: Can you write an SQL statement which solves the "six degrees of
Kevin Bacon" relationship between any two given actors?

  In other words, you give it two actor names and it tells you how many
steps apart they are from each other, via common movies they have acted in.
(Ie. if they have acted in the same movie, their degree of separation is 1,
if they haven't acted in the same movie but have acted with the same third
person, their degree of separation is 2, and so on.)

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.