Hi,
I need little bit of help regarding the question below , any of your
additional insight beside mine to the problem will be a great help
for me
Consider the following, rather limited, design of a (directed) graph:
nodes in the graph are instances
of node objects, and arcs are pointers (of type node*) between the
objects. Each node object holds a container of some sort (e.g. an array
of type node**), which in turn stores the node's outgoing arcs. There
exists a special non-arc global pointer to the node created first, so
as to provide a handle to the graph itself.
Discuss the pros and cons of this design, e.g. reason about the time
complexity for finding the number of nodes in the graph, comment on
what must be done when new nodes are inserted, etc. Can you think of an
alternative representation that overcomes some of the shortcomings of
this approach?
Thanx in advance 7 1387 fi*********@gmail.com wrote:
I need little bit of help regarding the question below , any of your
additional insight beside mine to the problem will be a great help
for me
Consider the following, rather limited, design of a (directed) graph:
nodes in the graph are instances
of node objects, and arcs are pointers (of type node*) between the
objects. Each node object holds a container of some sort (e.g. an array
of type node**), which in turn stores the node's outgoing arcs. There
exists a special non-arc global pointer to the node created first, so
as to provide a handle to the graph itself.
Discuss the pros and cons of this design, e.g. reason about the time
complexity for finding the number of nodes in the graph, comment on
what must be done when new nodes are inserted, etc. Can you think of an
alternative representation that overcomes some of the shortcomings of
this approach?
See this link: http://tinyurl.com/o5zw9
Cheers! --M fi*********@gmail.com wrote:
I need little bit of help regarding the question below , any of your
additional insight beside mine to the problem will be a great help
for me
Consider the following, rather limited, design of a (directed) graph:
nodes in the graph are instances
of node objects, and arcs are pointers (of type node*) between the
objects. Each node object holds a container of some sort (e.g. an
array of type node**), which in turn stores the node's outgoing arcs.
There exists a special non-arc global pointer to the node created
first, so as to provide a handle to the graph itself.
Discuss the pros and cons of this design, e.g. reason about the time
complexity for finding the number of nodes in the graph, comment on
what must be done when new nodes are inserted, etc. Can you think of
an alternative representation that overcomes some of the shortcomings
of this approach?
You're in luck! This is covered in the FAQ 5.2.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask fi*********@gmail.com wrote:
[blatant "do my homework for me" redacted]
What's your instructor's email address? I could send it directly to
him, and save you the trouble.
hi,
Thnx for your kind words, and this is my first post regarding any
problem in this group,
Its not an assignment and i dont have an intructor , i'm trying to
solve a question in " Cprogramming how to" by Dietel and Dietel, and my
instructor would be me , I know the answers to this question but was
not sure if i am correct
As i figured out its a grpah in which every node might be connected to
every other node in short its a TSP Problem and its NP-Hard, and also
if the number of nodes increases the time complexity can be exponential
, if one needs to insert a node one cannot find node (i mean it depends
which search u use). the solution can get stuck in local maxima.
However i couldnt come up with an alternative solution for this
representations.
So any help would be appreciated.
and BTW I'm not
red floyd wrote:
fi*********@gmail.com wrote:
[blatant "do my homework for me" redacted]
What's your instructor's email address? I could send it directly to
him, and save you the trouble.
hi,
Thnx for your kind words, and this is my first post regarding any
problem in this group,
Its not an assignment and i dont have an intructor , i'm trying to
solve a question in " Cprogramming how to" by Dietel and Dietel, and my
instructor would be me , I know the answers to this question but was
not sure if i am correct
As i figured out its a grpah in which every node might be connected to
every other node in short its a TSP Problem and its NP-Hard, and also
if the number of nodes increases the time complexity can be exponential
, if one needs to insert a node one cannot find node (i mean it depends
which search u use). the solution can get stuck in local maxima.
However i couldnt come up with an alternative solution for this
representations.
So any help would be appreciated.
and BTW I'm not
red floyd wrote:
fi*********@gmail.com wrote:
[blatant "do my homework for me" redacted]
What's your instructor's email address? I could send it directly to
him, and save you the trouble.
utopia_euphoria wrote:
and BTW I'm not
red floyd wrote:
>fi*********@gmail.com wrote:
>>[blatant "do my homework for me" redacted]
What's your instructor's email address? I could send it directly to him, and save you the trouble.
Its not an assignment and i dont have an intructor , i'm trying to
solve a question in " Cprogramming how to" by Dietel and Dietel, and my
instructor would be me , I know the answers to this question but was
not sure if i am correct
1. Please don't top post ( http://www.parashift.com/c++-faq-lite/how-to-post.html )-- reply moved
to conform to c.l.c++ netiquette.
2. If I just gave you the answer, you wouldn't learn a thing.
utopia_euphoria wrote:
hi,
Thnx for your kind words
Please don't top-post. See the newsgroup FAQ:
<http://www.parashift.com/c++-faq-lite/how-to-post.html>
Brian This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Greg Lindstrom |
last post by:
Hello-
I have a task which -- dare I say -- would be easy in <asbestos_undies>
Perl </asbestos_undies> but would rather do in Python (our primary
language at Novasys). I have a file with...
|
by: Usman |
last post by:
Huy everyone ,
Well I am not a big C++ programmer , I am just a little
young kid on it tryint to learn . Actually I was given an
assignment last week by my teacher which I solved
...
|
by: Philipp Lenssen |
last post by:
I want to write a third installment of "Little Known HTML Facts"*. I
would appreciate your input here.
For one thing, I would like to remember what exactly those proprietary
icons were you could...
|
by: Smartin |
last post by:
Can anyone help me get this update query right?
The SELECT subquery does select the rows I want to update when taken on
its own.
However when I add the UPDATE piece it finds no rows to update....
|
by: Jesper. |
last post by:
Hi,
I'm a former C++ programmer, and normally I didn't see
the use of the this pointer (pointer in c++) used as
often as I see it in C#. When the VS generates code for
you it uses >this< all...
|
by: MyNameIsnt |
last post by:
Can anyone tell me why, when I click on the buttons it register 2
characters on the display?
if you use the right mousebutton it works ok, but the buttons dont
flash??
it works fine without the...
|
by: Ken.Blair |
last post by:
I have a piece of software that generates surveys in HTML and then
"should" email the data to me. The script that was used by the survey
was pulled from the public domain and I have to come up...
|
by: brzozo2 |
last post by:
Hello, this program might look abit long, but it's pretty simple and
easy to follow. What it does is read from a file, outputs the contents
to screen, and then writes them to a different file. It...
|
by: petermichaux |
last post by:
Hi,
It seems like determining element position in a web page is a difficult
task. In the position reporting source code I've looked at there are
special fixes for at least some versions of...
|
by: Niranjan |
last post by:
I have this program :
void main()
{
int i=1;
if((*(char*)&i)==1)
printf("The machine is little endian.");
else
printf("The machine is big endian.");
}
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |