Re: powerset in Standard ML Programming Software Development by Rashakil Fol What's the powerset of the empty set? Given x and given the powerset of xs, what's the powerset of (x :: xs)? Bam, use recursion. powerset in Standard ML Programming Software Development by lotrsimp12345 so far I can't figure out a way to write powerset in SML :(. I see a pattern for example powerset([1,2,3]) is [] [1] [2] [1,3] [3] [1,2] [2,3] [1,2,3] Here's what I have come up with: fun add(a,L)= [a]@L fun ps(L)= ps(tl L)@add(hd L, ps(tl L)); Any help appreciated. Microsoft Shoots and Scores with Powerset Purchase Digital Media Digital Marketing Search Engine Strategies by Techwriter10 …play. They bought [URL="http://www.powerset.com/"]Powerset[/URL], a San Francisco-based semantic search … with this purchase. Blossom writes: [QUOTE]“Given Powerset's ability to parse natural language questions as well…web search market - as interesting as the techniques that Powerset uses are (Semantic Web, where art thou?) - this… Re: powerset in Standard ML Programming Software Development by lotrsimp12345 thanks i figured it out. Can someone tell me why the iterators are failing in STL Programming Software Development by k_arjun …(temp2.size() != (*vit).size()) { powerset.push_back(temp2); } } } return powerset; } I have got the code to …; ++vit) { set<char> temp2 = powerset[i]; int orig = temp2.size(); temp2.insert(*it);… Re: Can someone tell me why the iterators are failing in STL Programming Software Development by k_arjun …getPowerSet() is {a,b,c}. After the second iteration, the powerset becomes {a},{b},{a,b}. On the third iteration, when… the algo. in the third iteration: add {c} to the powerset. It is now {a},{b},{ab},{c} Iterate over the…Iteration: Tries to add c to c = {c} to the powerset but does not as it already exists. In the THIRD… java problem Programming Software Development by rione … mario,luigi,princess 1,2,3,4 jess JTextArea Output Powerset of set {mario,luigi,princess} is {null},{mario},{luigi},{princes…},{mari... Powerset of set {1,2,3,4} is {null},{1},{2…},{3},{4},{1,2},{1,3},{1,... Powerset of set {jess} is {null},{jess} tyBit(TM) Takes Aim At Google With New adScriber(TM) Program Digital Media Digital Marketing Search Engine Strategies by freddyleo1984 … the likes of Google and Yahoo including Collarity, Hakia and Powerset. "You need different tools to solve different problems,"… Need an online dictionary? Just ask Ask. Digital Media Digital Marketing Search Engine Strategies by newsguy …://www.itwire.com/content/view/19212/53/"]acquisition of Powerset[/URL]. It is thought that Microsoft is looking to make… Bing, SEO, and Google - News and Advice Digital Media Digital Marketing Search Engine Strategies by gervaisgroup … maybe that what’s important at the moment. Based on PowerSet, Bing will definitely give more weight to content, at the… stl set in C++ Programming Software Development by chaosgeneration … combination [code=c++]set< set<char> > powerSet(set<char S>)[/code] now, I'm not… Re: discrete math Programming Software Development by Hiroshe This should be catagorized in Computer Science. What I can tell you is what your looking for is the power set (the set of all subsets). One hint I'll give you is that building the powerset is exactly the same as traversing a binary tree. Each element can exist or not exist in the subset. Re: pseudocode perfect number program Programming Software Development by Hiroshe … to do it is trial division. For larger numbers, the powerset of all prime factors of the number will be faster. Re: Dani isn't killing DaniWeb with Dazah, she's saving it Community Center Meta DaniWeb by pty …-very-successful MSN search, plus they went out and bought [Powerset](https://en.wikipedia.org/wiki/Powerset_(company)), [Farecast](https://en… Re: Can someone tell me why the iterators are failing in STL Programming Software Development by ravenous You have to be careful when using iterators to vectors. When you call `push_back` on line 59, the vector has to grow by one element. If the capacity of the vector isn't sufficient to hold the new element, then the vector will re-allocate memory to accomodate the new element. Since the C++ standard says that a `std::vector` has to store its … Re: Can someone tell me why the iterators are failing in STL Programming Software Development by NathanOliver Are you saying that running this code will produce different outputs occasionally? Re: java problem Programming Software Development by jasimp You need to show us what you have done before we help you. We will not just give you code. Also ask specific questions when, don't just tell us you can't do it. Re: java problem Programming Software Development by Chaster I'm sure Google will help you out. Try searching for 'Power Set Java' Why do you take OOP courses (or whatever) if you don't want to learn? Re: Bing, SEO, and Google - News and Advice Digital Media Digital Marketing Search Engine Strategies by John LA This is what Microsoft has been doing for years on all its businesses. Trying to copy and improve things and after they made it their own, they monopolize it. Right now, they are trying to answer questions on how to tumble Google but doing other things other than search engine might be good move for them to give great return of resulting sites to … Re: Bing, SEO, and Google - News and Advice Digital Media Digital Marketing Search Engine Strategies by mahgobb SO for we webmasters, maybe it is really time for us to do Bing SEO! Re: Need an online dictionary? Just ask Ask. Digital Media Digital Marketing Search Engine Strategies by toni2pint Is it possible to buff scratches out of glass lenses? Re: Need an online dictionary? Just ask Ask. Digital Media Digital Marketing Search Engine Strategies by canadafred Listen, I like Ask. I remember well when they were Asjeeves, a magnificent Bristish search engine, probably the best in Europe at the time, but they are no match today in the SE wars; as a matter of fact, they've become quite the spammers in my opinion. Quite desperate for exposure. Re: stl set in C++ Programming Software Development by pseudorandom21 If your compiler has C++0x TR1 support, you can use the auto keyword for the type, otherwise you can use the iterator type. I'm not exactly sure what you want, but here is an example of iterating over a set with iterators. If iterators are new to you, you may wish to read about them before jumping in to using the STL. [code] set< int > … Re: stl set in C++ Programming Software Development by chaosgeneration Okay thanks for the input so far. This is helping me understand how to manipulate sets on the driver side. Now I need to figure out how to manipulate them in the functions. Also, if my set is full of chars instead of ints, how do I use the iterator to navigate the set? Re: stl set in C++ Programming Software Development by pseudorandom21 [url]http://www.cplusplus.com/reference/stl/set/[/url] //container info [url]http://www.cplusplus.com/reference/std/iterator/BidirectionalIterator/[/url] //iterator type info ex: [code] for( set<char>::iterator it = myset.begin(); it != myset.end(); ++it){ //use iterator } [/code] Re: stl set in C++ Programming Software Development by chaosgeneration Okay I've got most of it figured out now thanks! Now to figure out the combination algorithm with sets! Re: stl set in C++ Programming Software Development by chaosgeneration Okay so I've worked on the permutation function and here is what I've got so far [CODE]set<string> permutation(set<char>S) { set<string> fun; sort(S.begin(), S.end()); do{ fun.insert(S.begin(), S.end()); }while(next_permutation(S.begin(), S.end())); return fun; }[/CODE] I'm receiving errors in the algorithms file... but … Re: stl set in C++ Programming Software Development by chaosgeneration [QUOTE=chaosgeneration;1466524]Okay so I've worked on the permutation function and here is what I've got so far [CODE]set<string> permutation(set<char>S) { set<string> fun; sort(S.begin(), S.end()); do{ fun.insert(S.begin(), S.end()); }while(next_permutation(S.begin(), S.end())); return fun; }[/CODE] I'm … Re: stl set in C++ Programming Software Development by Zjarek Std::set is ordered, you can't change order of numbers. You could just use presorted normal array (vector) for next_permutation. Re: stl set in C++ Programming Software Development by pseudorandom21 That's a good idea with the std::next_permutation(), I should have caught on to that myself. I thought that function was absolutely awesome when I went to do some permutation stuff. Also, you may consider deciding upon the best container for your code, I would probably use a vector like Zjarek said. But the std::list<> can probably swap …