什么样的数据和算法可以计算出“你不认识的共同朋友”。 Facebook的功能? [英] What kind of data and algorithms could calculate a "mutual friends you didn't know you had" feature for Facebook?

查看:83
本文介绍了什么样的数据和算法可以计算出“你不认识的共同朋友”。 Facebook的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以有很多情况我有一个Facebook朋友,我有朋友,因为我们是更多朋友圈的成员,例如我们是同事,或者我们一起去营地。在这些情况下,我们经常会有一大群共同的朋友(例如我们的同事或同伴),这些朋友很多,很难浏览。



但有时候有意想不到的共同朋友!这些都是有趣的案例。如果你要构建一个意想不到的共同朋友功能,你会怎么做?

So there are lots of cases where I have a Facebook friend whom I have friends with because we are members of a larger circle of friends, e.g. we are coworkers, or we went to camp together. In those cases, we will often have a horde of mutual friends (e.g., our fellow coworkers or campmates) so numerous that it is difficult to browse through.

But sometimes there are unexpected mutual friends! And those are interesting cases to discover. If you were to build an unexpected mutual friends feature, how would you go about doing it?

推荐答案

嗨Javed;



我认为您需要一种方式来描述关系或描述共同的成员资格。知道B是不够的。



意想不到的共同朋友的一个可能的定义:



1.你属于一个俱乐部或组织并且

2.你的朋友都没有属于和/或
3.一个或多个共同的朋友属于这个俱乐部或组织。



您要求提供数据和算法。



主要数据类型将是朋友和一组朋友。



要执行的主要操作是设置交叉点。



示例:



每个人或组织都有一组朋友F。

对于A人和实体E,共同的朋友是FoA(A的朋友)与FoE(E的朋友)相交。
Hi Javed;

I think you'd need a way to describe the relationship or describe common memberships. A knows B wouldn't be enough.

One possible definition for "unexpected mutual friend":

1. you belong to a club or organization and
2. none of your friends belong and
3. one or more mutual friends belong to this club or org.

You asked for data and algorithms.

Principal data types would be a friend and a set of friends.

The main operation to be performed is set intersection.

Examples:

Each person or organization has a set of friends "F".
For person A and entity E, mutual friends are FoA (friend of "A") intersect FoE (friends of E).


这篇关于什么样的数据和算法可以计算出“你不认识的共同朋友”。 Facebook的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆