473,243 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,243 software developers and data experts.

Quick implementation of social networking

I need to implement a concept somewhat similar to social networking
sites like orkut/linkedIn etc etc... The story is below......

'A' can send request to any other member say 'B' to join his network.
The B joins his network. Now 'A' can approach the 'B' 's contacts by 2
ways directly or through 'B' and so on. Now suppose there is 'Z'
somewhere in the chain of 'B' , when I search for 'Z' it will display
me that you can reach 'Z' from 'B' using the chain or how can I view
the chain.

My question is "do i need to write/implement graph theory here or is
there any other rapid development approach available for this problem"

Sep 15 '06 #1
9 3870
phaedrus wrote:
I need to implement a concept somewhat similar to social networking
sites like orkut/linkedIn etc etc... The story is below......

'A' can send request to any other member say 'B' to join his network.
The B joins his network. Now 'A' can approach the 'B' 's contacts by 2
ways directly or through 'B' and so on. Now suppose there is 'Z'
somewhere in the chain of 'B' , when I search for 'Z' it will display
me that you can reach 'Z' from 'B' using the chain or how can I view
the chain.

My question is "do i need to write/implement graph theory here or is
there any other rapid development approach available for this problem"
The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++ (the topic of this newsgroup).

Don't fear doing it the right way!

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Sep 15 '06 #2
On Fri, 15 Sep 2006 12:08:12 GMT in comp.lang.c++, "Phlip"
<ph******@yahoo.comwrote,
>
The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++
Sounds like it might be related to
http://www.boost.org/libs/graph/doc/..._contents.html

Sep 15 '06 #3
Can you explain with example and how do we extract data from the
database.

David Harmon wrote:
On Fri, 15 Sep 2006 12:08:12 GMT in comp.lang.c++, "Phlip"
<ph******@yahoo.comwrote,

The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++

Sounds like it might be related to
http://www.boost.org/libs/graph/doc/..._contents.html
Sep 18 '06 #4
David Harmon wrote:
On Fri, 15 Sep 2006 12:08:12 GMT in comp.lang.c++, "Phlip"
<ph******@yahoo.comwrote,
>
>The path thru B to Z is just "minimum cost spanning tree", which is one of
>the simplest graph theory algorithms available. Look that up, and you might
>even find an implementation in C++
Sounds like it might be related to
http://www.boost.org/libs/graph/doc/..._contents.html

sg********@gmail.com wrote:
Can you explain with example and how do we extract data from the
database.
Buy the book! Boost::Graph is documented very well. It comes with CD.

ISBN: 0201729148

HTH,
Michiel Salters

Sep 18 '06 #5
Hi,
I dont think we exactly need Graph theory or "Minimum cost" Algos here
as in this case all the edges of the graph carry the same weightage.
We just need to detect the relation at minimum number of nodes/degrees.
If there is more than one path available to end contact with same
degree - we do not need to calulate anything based on "minumum cost" or
any other criteria as there is no different weightages of friendship.

As per my understanding, a sql query in the form of stored proc can be
enough which iteratively looks up friends at 1..n th level.

Your comments please...

Mi*************@tomtom.com wrote:
David Harmon wrote:
On Fri, 15 Sep 2006 12:08:12 GMT in comp.lang.c++, "Phlip"
<ph******@yahoo.comwrote,

The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++
>
Sounds like it might be related to
http://www.boost.org/libs/graph/doc/..._contents.html


sg********@gmail.com wrote:
Can you explain with example and how do we extract data from the
database.

Buy the book! Boost::Graph is documented very well. It comes with CD.

ISBN: 0201729148

HTH,
Michiel Salters
Sep 19 '06 #6

aa******@gmail.com wrote:
Hi,
I dont think we exactly need Graph theory or "Minimum cost" Algos here
as in this case all the edges of the graph carry the same weightage.
We just need to detect the relation at minimum number of nodes/degrees.
If there is more than one path available to end contact with same
degree - we do not need to calulate anything based on "minumum cost" or
any other criteria as there is no different weightages of friendship.

As per my understanding, a sql query in the form of stored proc can be
enough which iteratively looks up friends at 1..n th level.

Your comments please...
[snip]

You are off-topic here where standard C++ is discussed. So find a forum
where you are topical or rephrase your question so that it is about
standard C++.

/Peter

Sep 19 '06 #7
aa******@gmail.com wrote:
>I dont think we exactly need Graph theory or "Minimum cost" Algos here
as in this case all the edges of the graph carry the same weightage.
It's still "minimum cost spanning tree", because that finds the minimum cost
path, even when each edge is the same cost.

To solve this problem, you need graph theory (and a topical newsgroup);
there are no shortcuts.

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Sep 19 '06 #8
Thanx Peter but i am not the questioner - I am just replying to the
question that is already posted in this group.

peter koch wrote:
aa******@gmail.com wrote:
Hi,
I dont think we exactly need Graph theory or "Minimum cost" Algos here
as in this case all the edges of the graph carry the same weightage.
We just need to detect the relation at minimum number of nodes/degrees.
If there is more than one path available to end contact with same
degree - we do not need to calulate anything based on "minumum cost" or
any other criteria as there is no different weightages of friendship.

As per my understanding, a sql query in the form of stored proc can be
enough which iteratively looks up friends at 1..n th level.

Your comments please...
[snip]

You are off-topic here where standard C++ is discussed. So find a forum
where you are topical or rephrase your question so that it is about
standard C++.

/Peter
Sep 20 '06 #9
aa******@gmail.com wrote:
Thanx Peter but i am not the questioner - I am just replying to the
question that is already posted in this group.


Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or the group FAQ list:
<http://www.parashift.com/c++-faq-lite/how-to-post.html>
Sep 20 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: harlow.28 | last post by:
Looking to build a Social Networking site and i've heard of Drupal and Joomla and a few others and i was wondering if anyone had experience building a social networking site (i.e. myspace,...
10
by: Fenix [Youth Director] | last post by:
Hello, I am in need of advice or examples of how I should build my database for a small non-profit youth computer gaming organization. I am a beginner at database design and I know this project...
1
by: pmm101 | last post by:
Can anyone recommend a decent free open source social networking software? I have been experimenting with elgg but have given up on it. Any thoughts on astrospaces appreciated. What I'm...
2
by: sebhastian | last post by:
Im interested in creating our own social networking site. Can anyone recommend a company or tech firm that does this?
0
by: RigasMinho | last post by:
Description Company Description: Our client company is looking for very talented PHP engineers who can program without using any external tools. The company is a social networking company with...
1
by: Shalini Bhalla | last post by:
hi , i want to use Yogurt Social networking CMS software .... Pls tell me how exacly i will do it ? in site it is specified that : Upload the yogurt directory to...
4
by: avh | last post by:
Does anyone know of a white-label social networking framework that has been built in .NET? Seems like everything out there is PHP...
1
by: Grouchy.Oldgit | last post by:
Does anyone have experience (good or bad) with running any of the growing number of open source social networking platforms - eg elgg, phpizabi, PHP Social Flies etc etc
1
by: deepucando | last post by:
Hi i am trying to design a social networking site for my project. i have to design the database for the social networking with user profile and friends contact list as like facebook and orkut. ...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.