473,386 Members | 1,785 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,386 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 3875
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:
I’m 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.