• Breaking News

    Tuesday, March 30, 2021

    [Side-project] An fluid dynamics simulation done with C++ Computer Science

    [Side-project] An fluid dynamics simulation done with C++ Computer Science


    [Side-project] An fluid dynamics simulation done with C++

    Posted: 29 Mar 2021 02:58 PM PDT

    Any help on a quicksort implementation that uses a three-way partition in a specific way?

    Posted: 29 Mar 2021 01:40 PM PDT

    It's an exercise in my textbook and it asks specifically (I would summarize, but I might leave out important information):

    When implementing quicksort, if the array contains lots of duplicates, it may be better to perform a three-way partition (into elements less than, equal to, and greater than the pivot), to make smaller recursive calls. Assume three-way comparisons, as provided by the compareTo method.

    a. Give an algorithm that performs a three-way in-place partition of an N-element subarray using only N − 1 three-way comparisons. If there are d items equal to the pivot, you may use d additional Comparable swaps, above and beyond the two-way partitioning algorithm. (Hint: As i and j move toward each other, maintain five groups of elements as shown below):

    EQUAL SMALL UNKNOWN LARGE EQUAL

    .................i...............j

    b. Prove that using the algorithm above, sorting an N-element array that contains only d different values, takes O(dN) time.

    I spent a lot of time working on a three-way partition quicksort, using the Dutch National Flag problem, but my solution doesn't do it the way this exercise wants me to. I have no idea how to go about this. Any advice or insight or ideas?

    submitted by /u/Missing_Back
    [link] [comments]

    Free online summer schools aimed for exposing undergraduates to theoretical CS research

    Posted: 29 Mar 2021 10:50 PM PDT

    Computer network course

    Posted: 29 Mar 2021 06:50 PM PDT

    Can anyone recommend some interesting learning material about computer network? I'm taking a UG level CN course which I find so dry and boring. Is there any resources which can make the learning process more fun and enjoyable?

    Thank you redditor!

    submitted by /u/Ninol987
    [link] [comments]

    [N] DeepMind & Alberta U Introduce Novel Search Algorithm: Policy-Guided Heuristic Search with Guarantees

    Posted: 29 Mar 2021 05:42 PM PDT

    A research team from DeepMind and Alberta University proposes Policy-guided Heuristic Search (PHS), a novel search algorithm that uses both a heuristic function and a policy while offering guarantees on the search loss that relate to both the quality of the heuristic and the policy.

    Here is a quick read: DeepMind & Alberta U Introduce Novel Search Algorithm: Policy-Guided Heuristic Search with Guarantees

    The paper Policy-Guided Heuristic Search with Guarantees is on arXiv.

    submitted by /u/Yuqing7
    [link] [comments]

    No comments:

    Post a Comment