Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Array Count Pin
Code-o-mat21-May-11 11:17
Code-o-mat21-May-11 11:17 
AnswerRe: Array Count Pin
Hans Dietrich21-May-11 15:24
mentorHans Dietrich21-May-11 15:24 
QuestionRe: Array Count Pin
David Crow21-May-11 16:24
David Crow21-May-11 16:24 
AnswerRe: Array Count Pin
Software_Developer22-May-11 21:41
Software_Developer22-May-11 21:41 
AnswerRe: Array Count Pin
abhishek.biradar22-May-11 21:47
abhishek.biradar22-May-11 21:47 
Questionspace complexity Pin
moathyy21-May-11 1:45
moathyy21-May-11 1:45 
AnswerRe: space complexity Pin
CPallini21-May-11 3:04
mveCPallini21-May-11 3:04 
AnswerRe: space complexity Pin
Stefan_Lang23-May-11 0:22
Stefan_Lang23-May-11 0:22 
The whole point of complexity analysis is finding an estimate based on certain premises, usually the premise that this is a worst-case scenario. The only way to find out about that is knowing the whole program and the algorithms involved in that scenario.

For a full analysis you'd need to find all possible call paths, then start at the lowest level, i. e. functions that do not call any other functions, and analyze their complexity. The you go a level higher and do the same, using the complexity values you've already calculated from the lowest level functions. So you work your way up, until you are able to determine the complexity of main().

Of course, it isn't quite as easy as that: If you use multithreading you will need to consider the cost of synchronisation, and at the same time consider shared resources, and make sure you don't count them multiple times. If you have recursive calls, you need to determine the recursion depth. And worst of all, for every conditional branch, including end-of-loop conditions , you need to estimate the likelyhood for each branch.

Also, space complexity has the added complication that it can be reduced temporarily, making it impossible to determine the complexity of multi-threaded applications.

The biggest problem however is, that even the lowest level functions in your application may need to call system functions, drivers, or other external functionality that you don't possess any complexity information about.

Currently there is no system that can automate this process. And a full-fledged analysis of the whole system as described above is impossible to do manually for all but the most trivial applications. So the only way to do this is by looking at the parts of the system that you think are most critical and important to your users, and manually estimate the complexity for that.
QuestionHow to pass a window handle to another as command line argument. Pin
Nitheesh George20-May-11 22:24
Nitheesh George20-May-11 22:24 
AnswerRe: How to pass a window handle to another as command line argument. Pin
dasblinkenlight21-May-11 1:00
dasblinkenlight21-May-11 1:00 
AnswerRe: How to pass a window handle to another as command line argument. Pin
Richard MacCutchan21-May-11 1:49
mveRichard MacCutchan21-May-11 1:49 
AnswerRe: How to pass a window handle to another as command line argument. Pin
CPallini21-May-11 3:01
mveCPallini21-May-11 3:01 
AnswerRe: How to pass a window handle to another as command line argument. Pin
jschell21-May-11 12:22
jschell21-May-11 12:22 
AnswerRe: How to pass a window handle to another as command line argument. Pin
Mark Salsbery21-May-11 15:54
Mark Salsbery21-May-11 15:54 
Question[WINSOCK2] Handling icmp port unreachable Pin
Member 296547120-May-11 22:20
Member 296547120-May-11 22:20 
AnswerRe: [WINSOCK2] Handling icmp port unreachable Pin
Member 296547123-May-11 6:41
Member 296547123-May-11 6:41 
QuestionHow to return different types within one function Pin
Cold_Fearing_Bird20-May-11 19:29
Cold_Fearing_Bird20-May-11 19:29 
AnswerRe: How to return different types within one function Pin
Richard MacCutchan20-May-11 22:04
mveRichard MacCutchan20-May-11 22:04 
AnswerRe: How to return different types within one function Pin
jschell21-May-11 12:27
jschell21-May-11 12:27 
AnswerRe: How to return different types within one function Pin
Stefan_Lang23-May-11 2:01
Stefan_Lang23-May-11 2:01 
QuestionFunction pointer problem Pin
.jpg20-May-11 6:13
.jpg20-May-11 6:13 
QuestionRe: Function pointer problem Pin
David Crow20-May-11 7:16
David Crow20-May-11 7:16 
AnswerRe: Function pointer problem Pin
Albert Holguin20-May-11 8:08
professionalAlbert Holguin20-May-11 8:08 
GeneralRe: Function pointer problem Pin
David Crow20-May-11 8:12
David Crow20-May-11 8:12 
GeneralRe: Function pointer problem Pin
Albert Holguin20-May-11 9:24
professionalAlbert Holguin20-May-11 9:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.