notes/.config/newsboat/reddit_rss/algorithms.rss
2023-01-28 05:22:19 -08:00

1 line
No EOL
60 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><category term="algorithms" label="r/algorithms"/><updated>2023-01-24T03:27:31+00:00</updated><icon>https://www.redditstatic.com/icon.png/</icon><id>/r/algorithms.rss</id><link rel="self" href="https://www.reddit.com/r/algorithms.rss" type="application/atom+xml" /><link rel="alternate" href="https://www.reddit.com/r/algorithms" type="text/html" /><subtitle>Computer Science for Computer Scientists</subtitle><title>Computer Science for Computer Scientists</title><entry><author><name>/u/Danen1001</name><uri>https://www.reddit.com/user/Danen1001</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I wanted to see if there was some way to scan people&amp;#39;s whole profile for a specific type of image they posted. Like Google photos does when you type something random like &amp;quot;wedding ring&amp;quot;, pulls up all the pictures in your drive that look like a wedding ring. Could something like this be done with Facebook images on profiles?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Danen1001&quot;&gt; /u/Danen1001 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10jd6bv/im_working_on_a_social_media_project_is_there_a/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10jd6bv/im_working_on_a_social_media_project_is_there_a/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10jd6bv</id><link href="https://www.reddit.com/r/algorithms/comments/10jd6bv/im_working_on_a_social_media_project_is_there_a/" /><updated>2023-01-23T14:01:59+00:00</updated><published>2023-01-23T14:01:59+00:00</published><title>I'm working on a social media project. Is there a way to scan people's facebook pictures for a specific type of image?</title></entry><entry><author><name>/u/QueefiusMaximus86</name><uri>https://www.reddit.com/user/QueefiusMaximus86</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Weird question I know, but I am using BigQuery database and I want to speed up cohort selections based off of a limited set of attributes and I was wondering if there is a way to possibly hash each users unique attributes in a way that I could run queries checking if a FARM_HASH or some type of unique hash for an attribute could be used to check if the value was used to construct the hash. &lt;/p&gt; &lt;p&gt;The DB is very read heavy and only gets refreshed once a week, so I was thinking I could possibly construct a sparse array of all the attributes so that I would know at what index each unique value should be placed at and maybe use that value to check who has each attribute.&lt;/p&gt; &lt;p&gt;So what I am kinda looking for is something like a bloom filter, but since I will always know the number of unique attributes I should be possible to construct hashes that do not have false positives.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/QueefiusMaximus86&quot;&gt; /u/QueefiusMaximus86 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10iazp4/is_there_a_way_of_hashing_a_lexicographically/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10iazp4/is_there_a_way_of_hashing_a_lexicographically/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10iazp4</id><link href="https://www.reddit.com/r/algorithms/comments/10iazp4/is_there_a_way_of_hashing_a_lexicographically/" /><updated>2023-01-22T04:30:14+00:00</updated><published>2023-01-22T04:30:14+00:00</published><title>Is there a way of hashing a lexicographically sorted set of attributes such that you can easily check if a subset of attributes is contained/used to construct the hash?</title></entry><entry><author><name>/u/PertinentPenguin</name><uri>https://www.reddit.com/user/PertinentPenguin</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I&amp;#39;m practicing writing and understanding binary search (with python). I often see two different implementations for calculating the midpoint -- one makes sense and the other confuses me. I&amp;#39;d like to understand if both are correct ways to write a binary search (and why they are both valid).&lt;/p&gt; &lt;p&gt;The first way, which I prefer, is calculating midpoint like:&lt;/p&gt; &lt;p&gt;&lt;code&gt;mid = (hi + lo) // 2&lt;/code&gt;&lt;/p&gt; &lt;p&gt;However, I also see midpoint calculated like:&lt;/p&gt; &lt;p&gt;&lt;code&gt;mid = lo + ((hi - lo) // 2)&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Which to me is much more confusing and I&amp;#39;m not sure what the reasoning behind this formula is. Is there a difference between these two? Are they both correct?&lt;/p&gt; &lt;p&gt;Here is the final code to my binary search using the first formula which seems to work as expected:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;class Solution(object): def search(self, nums, target): low = 0 hi = len(nums) - 1 while low &amp;lt;= hi: mid = (hi + low) // 2 if nums[mid] == target: return mid elif nums[mid] &amp;gt; target: hi = mid - 1 else: low = mid + 1 return -1 &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Edit: thanks everyone, this makes way more sense now!&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/PertinentPenguin&quot;&gt; /u/PertinentPenguin &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10i5bgg/binary_search_midpoint_calculation/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10i5bgg/binary_search_midpoint_calculation/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10i5bgg</id><link href="https://www.reddit.com/r/algorithms/comments/10i5bgg/binary_search_midpoint_calculation/" /><updated>2023-01-21T23:46:41+00:00</updated><published>2023-01-21T23:46:41+00:00</published><title>Binary search midpoint calculation</title></entry><entry><author><name>/u/Areebaaaa</name><uri>https://www.reddit.com/user/Areebaaaa</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hey, I&amp;#39;ve just started learning DSA and I am coming across different types of problems that are considered to be classics like Tower of Hanoi, Josephus, Subset Sum, Nqueen&amp;#39;s etc&lt;/p&gt; &lt;p&gt;My question is, why do we have to study these problems? what do we gain? how do we apply this understanding?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Areebaaaa&quot;&gt; /u/Areebaaaa &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10i6ewi/what_is_the_goal_to_study_classic_dsa_problems/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10i6ewi/what_is_the_goal_to_study_classic_dsa_problems/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10i6ewi</id><link href="https://www.reddit.com/r/algorithms/comments/10i6ewi/what_is_the_goal_to_study_classic_dsa_problems/" /><updated>2023-01-22T00:37:31+00:00</updated><published>2023-01-22T00:37:31+00:00</published><title>What is the goal to study classic DSA problems?</title></entry><entry><author><name>/u/janislych</name><uri>https://www.reddit.com/user/janislych</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/janislych&quot;&gt; /u/janislych &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;/r/learnpython/comments/10h033u/i_am_trying_swap_two_designated_nodes_in_a_doubly/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10h1wt5/i_am_trying_swap_two_designated_nodes_in_a_doubly/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10h1wt5</id><link href="https://www.reddit.com/r/algorithms/comments/10h1wt5/i_am_trying_swap_two_designated_nodes_in_a_doubly/" /><updated>2023-01-20T16:55:10+00:00</updated><published>2023-01-20T16:55:10+00:00</published><title>I am trying swap two designated nodes in a doubly link list - order of updating the</title></entry><entry><author><name>/u/amir4v</name><uri>https://www.reddit.com/user/amir4v</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I read about Hash-Table and that it needs a function to convert text to number, and I wrote this function. I am happy to know your opinion.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://github.com/amir4v/dev/blob/main/A-Hash.py&quot;&gt;https://github.com/amir4v/dev/blob/main/A-Hash.py&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/amir4v&quot;&gt; /u/amir4v &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10h1cz4/hashtable_function/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10h1cz4/hashtable_function/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10h1cz4</id><link href="https://www.reddit.com/r/algorithms/comments/10h1cz4/hashtable_function/" /><updated>2023-01-20T16:32:42+00:00</updated><published>2023-01-20T16:32:42+00:00</published><title>Hash-Table function</title></entry><entry><author><name>/u/markhallak</name><uri>https://www.reddit.com/user/markhallak</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;&lt;strong&gt;Let me point out first that the contest is offline and it is not currently running.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I have been stuck on this problem and I couldn&amp;#39;t find an optimal solution for this question. Take a look at the pictures before continuing reading (I couldn&amp;#39;t attach images and if I shared the link to the problem, you wouldn&amp;#39;t be able to see it).&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://ibb.co/x75pPKF&quot;&gt;https://ibb.co/x75pPKF&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://ibb.co/x2qxgXr&quot;&gt;https://ibb.co/x2qxgXr&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://ibb.co/GHH4FsK&quot;&gt;https://ibb.co/GHH4FsK&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#x200B;&lt;/p&gt; &lt;p&gt;I thought of two solutions:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Sort the array and take the smallest integer &lt;em&gt;x&lt;/em&gt; and the biggest integer &lt;em&gt;y&lt;/em&gt; and take the floor of &lt;em&gt;x/y&lt;/em&gt; and add it to the score. (Doesn&amp;#39;t work on testcases similar to testcase 3 in the example input)&lt;/li&gt; &lt;li&gt;Sort the array and take the smallest integer &lt;em&gt;x&lt;/em&gt; and take the next smaller integer &lt;em&gt;y&lt;/em&gt; or the biggest integer &lt;em&gt;y&lt;/em&gt; and the second biggest number &lt;em&gt;x&lt;/em&gt; and take the floor of &lt;em&gt;x/y&lt;/em&gt; and add it to the score. (Doesn&amp;#39;t work on testcases similar to testcase 1 in the example input)&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;I feel like for each input, it needs to be analyzed (like counting the frequency of the integers and checking if there are many big numbers or there are complementary integers where the floor of &lt;em&gt;x/y&lt;/em&gt; is 0) then figuring out which solution to use. But this is just a thought, it is not the right way to solve or feasible.&lt;/p&gt; &lt;p&gt;I am not sure if there is a solution for this problem somewhere online. I searched online but couldn&amp;#39;t find anything. I would appreciate any help with this.&lt;/p&gt; &lt;p&gt;Thank you in advance.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/markhallak&quot;&gt; /u/markhallak &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10ge9ln/need_help_with_this_competitive_programming/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10ge9ln/need_help_with_this_competitive_programming/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10ge9ln</id><link href="https://www.reddit.com/r/algorithms/comments/10ge9ln/need_help_with_this_competitive_programming/" /><updated>2023-01-19T21:45:00+00:00</updated><published>2023-01-19T21:45:00+00:00</published><title>Need help with this competitive programming question</title></entry><entry><author><name>/u/d_p_jones</name><uri>https://www.reddit.com/user/d_p_jones</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I am trying to create a generic algorithm for allocating competitors to timeslots for a competition, and am succeeding only in frying my brain.&lt;/p&gt; &lt;p&gt;For the sake of this example, I can reduce the problem to this:&lt;/p&gt; &lt;p&gt;A competition takes place, but for capacity reasons, the competitors are split into three *equally sized* groups. (A,B,C).&lt;/p&gt; &lt;p&gt;However, I need to follow certain allocation rules. There are only three type of rule. Either the &lt;strong&gt;same group&lt;/strong&gt; as another person, &lt;strong&gt;different group&lt;/strong&gt; to another person, or a &lt;strong&gt;limited subset&lt;/strong&gt; of groups are valid. For example:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Competitor 1 must be in the same group as Competitor 2&lt;/li&gt; &lt;li&gt;Competitor 3 must be in a different group to competitor 4&lt;/li&gt; &lt;li&gt;Competitor 5 must be in group A&lt;/li&gt; &lt;li&gt;Competitor 6 can be in either group A or group C&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Multiple rules might exist that relate to a given competitor (e.g. must be different to competitor 5, and can only be in B or C). Or there may be no rules for a given person, which means they can go anywhere, once the rest of the allocation is complete.&lt;/p&gt; &lt;p&gt;So, my approach might be:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Firstly, split the competitors such that I have a list of competitors with no rules (the fillers) and a list of competitors with rules.&lt;/li&gt; &lt;li&gt;Then, loop through the rules:&lt;/li&gt; &lt;li&gt;For each rule, if a SPECIFIC group is required, allocate those competitors.&lt;/li&gt; &lt;li&gt;Next, iterate over the &amp;quot;Same Group&amp;quot; rules and where a competitor needs to be in the same group as someone who is now allocated to a group, put them in that group. Repeat until no more allocations are possible.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;This is where I come unstuck... What remains is a list of people who need to be in the same/different group as someone else (who may or may not be in a group yet) and/or can only be allocated to a subset of the remaining groups. And I need to end up with equally sized groups.&lt;/p&gt; &lt;p&gt;I can get a bit further by merging two competitors that need to be in the same group, and setting that sets &amp;quot;valid groups&amp;quot; to be the intersection of the two individuals &amp;quot;valid groups&amp;quot;. This *might* mean I&amp;#39;m able to allocate a few more people, but I&amp;#39;m still stuck with the same problem, which is a kind of partitioning problem with extra rules.&lt;/p&gt; &lt;p&gt;The solution has to scale to a maximum of 8 groups, and 250 competitors.&lt;/p&gt; &lt;p&gt;As it happens, I&amp;#39;m doing this in javascript and have the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;An array of competitors : &lt;code&gt;[{id:1, name:&amp;quot;John&amp;quot;},{...},{...}]&lt;/code&gt;&lt;/li&gt; &lt;li&gt;An array of rules, where each rule is an object, eg,&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;code&gt;[ {competitorID: 1, ruletype:&amp;quot;SAMEGROUP&amp;quot;, asCompetitorId:2}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;{competitorID: 1, ruletype:&amp;quot;DIFFGROUP&amp;quot;, asCompetitorId:3}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;{competitorID: 1, ruletype:&amp;quot;GROUP&amp;quot;, validGroups:[&amp;quot;A&amp;quot;,&amp;quot;C&amp;quot;]}]&lt;/code&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The event meta, e.g. &lt;code&gt;{numberOfGroups:3, maxGroupSize:20}&lt;/code&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Although, even just working out how to do this in english would be a good start. &lt;/p&gt; &lt;p&gt;Can anyone help?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/d_p_jones&quot;&gt; /u/d_p_jones &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10g5tc7/allocating_people_to_sets_brain_broken_seeking/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10g5tc7/allocating_people_to_sets_brain_broken_seeking/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10g5tc7</id><link href="https://www.reddit.com/r/algorithms/comments/10g5tc7/allocating_people_to_sets_brain_broken_seeking/" /><updated>2023-01-19T16:19:47+00:00</updated><published>2023-01-19T16:19:47+00:00</published><title>Allocating people to sets - Brain broken. Seeking help.</title></entry><entry><author><name>/u/graph-quest2</name><uri>https://www.reddit.com/user/graph-quest2</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;lets say we have a square 0123 and edge 1 to 3, 0 starting node&lt;/p&gt; &lt;pre&gt;&lt;code&gt; while len(stack)&amp;gt;0: v=stack.pop() if v !=end: path.append(v) if v==end: print(path, stack) while len(stack)&amp;gt;0 and stack[-1] not in g.adjacent_nodes(path[-1]) : b=path.pop() visited.remove(b) if v not in visited and v != end: visited.append(v) # print(visited) for w in g.adjacent_nodes(v): if w not in visited: stack.append(w) came_from[w]=v &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;i want all paths between 0 and 2&lt;/p&gt; &lt;p&gt;my problem is i can only get 2, the third one is as same as the first&lt;/p&gt; &lt;p&gt;what the code does is once it find the target, it removed pops the end of the path and marks the popped node as unvisited&lt;/p&gt; &lt;p&gt;it keeps doing so until it reached the last node in the stack&lt;/p&gt; &lt;p&gt;first path i get is 0312...second is 032... third 0312&lt;/p&gt; &lt;p&gt;the problem makes sense to me, but i am not understanding how to fix this, because the typical way of doing backtracking is what i am doing. what am i missing?&lt;/p&gt; &lt;p&gt;thanks for help&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/graph-quest2&quot;&gt; /u/graph-quest2 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10gf7fn/finding_all_paths_between_2_nodes_dfs_nonrecursive/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10gf7fn/finding_all_paths_between_2_nodes_dfs_nonrecursive/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10gf7fn</id><link href="https://www.reddit.com/r/algorithms/comments/10gf7fn/finding_all_paths_between_2_nodes_dfs_nonrecursive/" /><updated>2023-01-19T22:24:26+00:00</updated><published>2023-01-19T22:24:26+00:00</published><title>finding all paths between 2 nodes DFS non-recursive</title></entry><entry><author><name>/u/DataStjepan</name><uri>https://www.reddit.com/user/DataStjepan</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Not really an introduction as it says in the title, but definitely a valuable watch:&lt;br/&gt; &lt;a href=&quot;https://www.youtube.com/watch?v=O9N8Hy3unfw&quot;&gt;https://www.youtube.com/watch?v=O9N8Hy3unfw&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/DataStjepan&quot;&gt; /u/DataStjepan &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10fynon/an_introduction_to_modern_hashing/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10fynon/an_introduction_to_modern_hashing/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10fynon</id><link href="https://www.reddit.com/r/algorithms/comments/10fynon/an_introduction_to_modern_hashing/" /><updated>2023-01-19T10:44:55+00:00</updated><published>2023-01-19T10:44:55+00:00</published><title>An Introduction to Modern Hashing</title></entry><entry><author><name>/u/kursat44</name><uri>https://www.reddit.com/user/kursat44</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I have been trying to finish Data Structures challenges of Hackerrank. At first, it went well for me, but then there are some algorithm questions, and I have never heard some of them before, thus I couldn&amp;#39;t solve them. I researched on YouTube but I couldn&amp;#39;t so I found code somewhere else looked and tried to understand. I got them but I forgot again, I think it was a temporary understanding.&lt;/p&gt; &lt;p&gt;How to learn the algorithms efficiently and permenantly. Is there a way to do that? What would your suggestions be?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/kursat44&quot;&gt; /u/kursat44 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10fd8f2/how_to_learn_algorithms/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10fd8f2/how_to_learn_algorithms/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10fd8f2</id><link href="https://www.reddit.com/r/algorithms/comments/10fd8f2/how_to_learn_algorithms/" /><updated>2023-01-18T17:31:33+00:00</updated><published>2023-01-18T17:31:33+00:00</published><title>How to learn Algorithms?</title></entry><entry><author><name>/u/docperianFB27</name><uri>https://www.reddit.com/user/docperianFB27</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hey everyone! I am currently working on a project with PNG files (basically a decoder). I&amp;#39;m using the official documentation for that.&lt;/p&gt; &lt;p&gt;The algorithm used for encoding of the IDAT chunks is DEFLATE. I concatenate all the data from the IDAT chunks (without header and CRC of course). The question is: Is was this data originally encoded all together or as individual chunks? If as individual chunks, does that mean that these chunk boundaries can end somewhere in the middle of the IDAT chunk? Or should they be exactly the size of IDAT data?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/docperianFB27&quot;&gt; /u/docperianFB27 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10f5b3x/are_idat_chunks_in_png_encoded_individually/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10f5b3x/are_idat_chunks_in_png_encoded_individually/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10f5b3x</id><link href="https://www.reddit.com/r/algorithms/comments/10f5b3x/are_idat_chunks_in_png_encoded_individually/" /><updated>2023-01-18T11:40:07+00:00</updated><published>2023-01-18T11:40:07+00:00</published><title>Are IDAT chunks in PNG encoded individually?</title></entry><entry><author><name>/u/BzAzy</name><uri>https://www.reddit.com/user/BzAzy</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hi guys, I&amp;#39;m really struggling at the moment with creating the recursive function for dynamic programing problems. We&amp;#39;re only required to write the recursive function and explain it, but I can&amp;#39;t get it. On every problem I&amp;#39;m solving correctly, i fail on 5 others.&lt;/p&gt; &lt;p&gt;I would be happy to hear some tips from your experience about how to be better at this.&lt;/p&gt; &lt;p&gt;Thanks&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/BzAzy&quot;&gt; /u/BzAzy &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10eo459/tips_for_dynamic_programing/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10eo459/tips_for_dynamic_programing/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10eo459</id><link href="https://www.reddit.com/r/algorithms/comments/10eo459/tips_for_dynamic_programing/" /><updated>2023-01-17T21:28:27+00:00</updated><published>2023-01-17T21:28:27+00:00</published><title>Tips for dynamic programing</title></entry><entry><author><name>/u/filch-argus</name><uri>https://www.reddit.com/user/filch-argus</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I know &amp;quot;The Art of Computer Programming&amp;quot; uses some assembly language for algorithms implementation. &lt;/p&gt; &lt;p&gt;Would it be feasible to replace it with WebAssembly as I read the book? Is WebAssembly simpler or more complicated than it? Thanks in advance.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/filch-argus&quot;&gt; /u/filch-argus &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10ee1o6/the_art_of_computer_programming_in_webassembly/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10ee1o6/the_art_of_computer_programming_in_webassembly/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10ee1o6</id><link href="https://www.reddit.com/r/algorithms/comments/10ee1o6/the_art_of_computer_programming_in_webassembly/" /><updated>2023-01-17T14:48:19+00:00</updated><published>2023-01-17T14:48:19+00:00</published><title>The Art of Computer Programming in WebAssembly</title></entry><entry><author><name>/u/alexvoedi</name><uri>https://www.reddit.com/user/alexvoedi</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;``` Let S be a set system on a set X. Then (xy|z) is a triple of S if there is a subset C ∈ S with x,y ∈ C and z ∉ C.&lt;/p&gt; &lt;p&gt;A set system is called a weak hierarchy if for any three sets A,B,C ∈ S it holds that A ∩ B ∩ C ∈ {A ∩ B, A ∩ C, B ∩ C}.&lt;/p&gt; &lt;p&gt;A set of triples is called &lt;em&gt;consistent&lt;/em&gt; if a weak hierarchy can be constructed from it.&lt;/p&gt; &lt;p&gt;I have given a set of inconsistent triples. I want to find the maximum subset of triples which are consistent, that is, which form a weak hierarchy. ```&lt;/p&gt; &lt;p&gt;I am NOT looking for an exact solution of this problem. I am looking for ideas how I could solve this problem or if there are some problems that are similar to this. Maybe this problem even has a name.&lt;/p&gt; &lt;hr/&gt; &lt;p&gt;Edit 1: Some further explanations:&lt;/p&gt; &lt;p&gt;The following is a weak hierarchy: &lt;code&gt; [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 2, 5 ] [ 3, 4 ] [ 1, 4 ] [ 3, 4, 5 ] [ 2, 4, 5 ] [ 1, 3, 4, 5 ] [ 1, 2, 3, 4, 5 ] &lt;/code&gt; Why is it a weak hierarchy? Because for every 3 sets A, B, C the intersection of A, B and C equals the intersection of 2 of them (A ∩ B ∩ C ∈ {A ∩ B, A ∩ C, B ∩ C}).&lt;/p&gt; &lt;p&gt;Now we can construct a list of triples from this weak hierarchy. A triple consists of 3 elements x,y,z where x and y must in one of the sets of the weak hierarchy and z is not allowed to be in the same set.&lt;/p&gt; &lt;p&gt;For example &lt;code&gt;(3,4|1)&lt;/code&gt; is a valid triple because in the weak hierarchy there exists at least one set (in this example &lt;code&gt;[3, 4, 5]&lt;/code&gt;), which has 3 and 4 as elements but not 1.&lt;/p&gt; &lt;p&gt;We can construct the list of all triples from a weak hierarchy. For the weak hierarchy in this example we have the following set of triples: &lt;code&gt; (1,3|2) (1,4|2) (1,4|3) (1,4|5) (1,5|2) (2,4|1) (2,4|3) (2,5|1) (2,5|3) (2,5|4) (3,4|1) (3,4|2) (3,4|5) (3,5|1) (3,5|2) (4,5|1) (4,5|2) (4,5|3) &lt;/code&gt; The pipe is only a reminder that the first 2 items must be included in the same set and the item on the right side of the pipe is not allowed to be in the same set. (If someone knows a better notation for a tripel, feel free to let me know.)&lt;/p&gt; &lt;p&gt;Now there are tripel sets from which no weak hierarchy can be constructed. A simple example is &lt;code&gt;{(1,2|3),(1,3|2),(2,3|1)}&lt;/code&gt;. We call this triple set inconsistent.&lt;/p&gt; &lt;p&gt;Now given a set of (maybe inconsistent) triples, I want to find a maximum subset which is a weak hierarchy.&lt;/p&gt; &lt;hr/&gt; &lt;p&gt;I want to remind you that I don&amp;#39;t need a solution for this problem. I just want to find a good way to start working on this problem. I think using graph theory, or more precisely, modelling this with hypergraphs might be a good approach.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/alexvoedi&quot;&gt; /u/alexvoedi &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10dites/find_maximum_subset_that_satisfies_a_constraint/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10dites/find_maximum_subset_that_satisfies_a_constraint/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10dites</id><link href="https://www.reddit.com/r/algorithms/comments/10dites/find_maximum_subset_that_satisfies_a_constraint/" /><updated>2023-01-16T16:25:02+00:00</updated><published>2023-01-16T16:25:02+00:00</published><title>Find maximum subset that satisfies a constraint</title></entry><entry><author><name>/u/graph-quests</name><uri>https://www.reddit.com/user/graph-quests</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;the shortest path to all nodes is:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;{&amp;#39;a&amp;#39;: 0, &amp;#39;c&amp;#39;: 2, &amp;#39;b&amp;#39;: 4, &amp;#39;g&amp;#39;: 5, &amp;#39;f&amp;#39;: 10, &amp;#39;d&amp;#39;: 6, &amp;#39;j&amp;#39;: 9, &amp;#39;h&amp;#39;: 11} &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;i have another dictionary which records the first cost seen for a node:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;{&amp;#39;a&amp;#39;: 0, &amp;#39;c&amp;#39;: 2, &amp;#39;b&amp;#39;: 4, &amp;#39;g&amp;#39;: 7, &amp;#39;d&amp;#39;: 6, &amp;#39;j&amp;#39;: 9, &amp;#39;f&amp;#39;: 10, &amp;#39;h&amp;#39;: 12} &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;if i want to get the second shortest path, i see node &amp;#39;h&amp;#39; has a difference of 1, so second shortest path should be from the first parent of &amp;#39;h&amp;#39; towards &amp;#39;a&amp;#39;&lt;/p&gt; &lt;p&gt;for the third shortest path, the second biggest difference is for node &amp;#39;g&amp;#39;, so third shortest path should be from first parent of &amp;#39;g&amp;#39; towards source node &amp;#39;a&amp;#39; + dijkstra( &amp;#39;g&amp;#39; to &amp;#39;h&amp;#39;)&lt;/p&gt; &lt;p&gt;question: how can i find the fourth shortest path? the rest of nodes are same in both dictionaries&lt;/p&gt; &lt;p&gt;you can check out the graph in this video &lt;a href=&quot;https://www.youtube.com/watch?v=CerlT7tTZfY&quot;&gt;Implementing Dijkstra&amp;#39;s Algorithm with a Priority Queue - YouTube&lt;/a&gt;&lt;/p&gt; &lt;p&gt;thanks for help&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/graph-quests&quot;&gt; /u/graph-quests &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10cxdk9/how_modify_dijkstra_to_get_kth_shortest_path/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10cxdk9/how_modify_dijkstra_to_get_kth_shortest_path/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10cxdk9</id><link href="https://www.reddit.com/r/algorithms/comments/10cxdk9/how_modify_dijkstra_to_get_kth_shortest_path/" /><updated>2023-01-15T22:43:08+00:00</updated><published>2023-01-15T22:43:08+00:00</published><title>how modify dijkstra to get kth shortest path</title></entry><entry><author><name>/u/syko101</name><uri>https://www.reddit.com/user/syko101</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;So I&amp;#39;m working on project which goal is to digitally emulate guitar tube amplifiers using a Wiener-Hammerstein model.&lt;/p&gt; &lt;p&gt;For those of you unfamiliar with this type of model, its key block is a nonlinear block that is characterized by a set of 8 parameters. Basically there&amp;#39;s a raw input guitar signal and there&amp;#39;s an output signal that should be as close as possible to the actual output of the modeled amplifier.&lt;/p&gt; &lt;p&gt;I have a database with a series of magnitude-variable chirp signals serving as inputs and the respective output measurements.&lt;/p&gt; &lt;p&gt;So my question is what is the best way for me to automate the process of optimization of this set parameters. I thought of using a genetic algorithm but I wondered if that&amp;#39;s the most accurate and efficient way of doing it.&lt;/p&gt; &lt;p&gt;Also this is to be implement on a microcontroller so I have more limited resources than a computer. However, it would be really cool to be able to customize these parameters in real time on my Teensy 4.0 so it would be ideal that the algorithm could meet this condition, although it&amp;#39;s not completely necessary&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/syko101&quot;&gt; /u/syko101 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10cxb3u/parameter_optimization_for_guitar_amp_emulation/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10cxb3u/parameter_optimization_for_guitar_amp_emulation/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10cxb3u</id><link href="https://www.reddit.com/r/algorithms/comments/10cxb3u/parameter_optimization_for_guitar_amp_emulation/" /><updated>2023-01-15T22:40:23+00:00</updated><published>2023-01-15T22:40:23+00:00</published><title>Parameter optimization for guitar amp emulation</title></entry><entry><author><name>/u/Gletta</name><uri>https://www.reddit.com/user/Gletta</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Dear all,&lt;/p&gt; &lt;p&gt;Here is Computer Vision News of January 2023.&lt;/p&gt; &lt;p&gt;It includes reviews of 2 Best Paper Award winning research papers.&lt;/p&gt; &lt;p&gt;Read 44 pages about AI, Deep Learning, Computer Vision and more - with code!&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://www.rsipvision.com/ComputerVisionNews-2023January/&quot;&gt;Read online version for free (recommended)&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://www.rsipvision.com/computer-vision-news-2023-january-pdf/&quot;&gt;PDF version&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Free subscription on page 44.&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Gletta&quot;&gt; /u/Gletta &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10ck1gu/computer_vision_news_the_magazine_of_the/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10ck1gu/computer_vision_news_the_magazine_of_the/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10ck1gu</id><link href="https://www.reddit.com/r/algorithms/comments/10ck1gu/computer_vision_news_the_magazine_of_the/" /><updated>2023-01-15T13:35:18+00:00</updated><published>2023-01-15T13:35:18+00:00</published><title>Computer Vision News, the magazine of the algorithm community - January 2023</title></entry><entry><author><name>/u/BetoMoedano</name><uri>https://www.reddit.com/user/BetoMoedano</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I am excited to finally make public my GitHub repository of algorithms and data structures! This repository contains over 100 famous and crucial algorithms that are essential for anyone preparing for technical interviews as a software engineer.&lt;/p&gt; &lt;p&gt;I&amp;#39;ve been working on this repository for a while now and I am proud to say that it contains a wide variety of algorithms, from the most basic to the most advanced, covering a wide range of topics such as sorting, searching, graph theory, dynamic programming, and more.&lt;/p&gt; &lt;p&gt;I&amp;#39;ve decided to make this repository public in the hope that it will help someone else who is preparing for technical interviews. I believe that the more resources available, the better the chance of success. I also hope that it will inspire others to share their own knowledge and contribute to the repository.&lt;/p&gt; &lt;p&gt;I would like to invite anyone who is interested to contribute to this repository. If you have solutions in other programming languages, feel free to share them with the community. If you see any errors or have suggestions for improvement, please don&amp;#39;t hesitate to let me know.&lt;/p&gt; &lt;p&gt;In short, I am excited to finally share this repository with the world and I hope that it will be a valuable resource for anyone preparing for technical interviews as a software engineer. Let&amp;#39;s learn, share and grow together!&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://github.com/betomoedano/JavaScript-Coding-Interview-Questions&quot;&gt;https://github.com/betomoedano/JavaScript-Coding-Interview-Questions&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/BetoMoedano&quot;&gt; /u/BetoMoedano &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10b9001/algorithms_and_data_structures/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10b9001/algorithms_and_data_structures/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10b9001</id><link href="https://www.reddit.com/r/algorithms/comments/10b9001/algorithms_and_data_structures/" /><updated>2023-01-13T23:28:03+00:00</updated><published>2023-01-13T23:28:03+00:00</published><title>Algorithms and Data Structures</title></entry><entry><author><name>/u/aproposofwetsnow22</name><uri>https://www.reddit.com/user/aproposofwetsnow22</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Layman here.&lt;/p&gt; &lt;p&gt;Yesterday I was watching a two hour long gaming video on YouTube where the streamer made a passing comment on how interesting he found it that foods that historically were reserved for the poor have no become delicacies. He cited lobster as an example.&lt;/p&gt; &lt;p&gt;This morning I received a recommended post on Reddit &amp;#39;History Memes&amp;#39; that touched on this very point. The post is 3 months old and had very little upvotes or comments. I did not input any data into my computer that would suggest I am further interested in the topic or otherwise speak about IRL. I am assuming the recommendation was therefore not completely random.&lt;/p&gt; &lt;p&gt;My question relates to how the algorithm got to the point of recommending the meme. Does the AI simply take note of the fact that I watched the video, and correlate this to google searches that other viewers of the video may have made (i.e. googling: &amp;#39;did lobster use to be a food for poor people?&amp;#39;), and then somehow correlate that to the meme? Or did the AI &amp;#39;grasp&amp;#39; the concept of the youtubers comment by analyzing the video&amp;#39;s audio, and &amp;#39;grasp&amp;#39; of the content of the meme by analyzing its text, put two and two together, and come up with the Reddit recommendation, merely based off the fact that I watched the video.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/aproposofwetsnow22&quot;&gt; /u/aproposofwetsnow22 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10bvkq7/question_about_google_algorithms/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10bvkq7/question_about_google_algorithms/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10bvkq7</id><link href="https://www.reddit.com/r/algorithms/comments/10bvkq7/question_about_google_algorithms/" /><updated>2023-01-14T18:30:32+00:00</updated><published>2023-01-14T18:30:32+00:00</published><title>Question about google algorithms</title></entry><entry><author><name>/u/the_graph_guy</name><uri>https://www.reddit.com/user/the_graph_guy</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;i am trying to understand how to remove edges &lt;a href=&quot;https://www.linchenguang.com/2018/01/30/Yen-s-algorithm/&quot;&gt;from here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;my problem is in photo 33&lt;/p&gt; &lt;p&gt;on what basis did we decide to remove 2 edges?&lt;/p&gt; &lt;p&gt;from &lt;a href=&quot;https://stackoverflow.com/questions/7208720/finding-kth-shortest-paths&quot;&gt;here,&lt;/a&gt; &amp;#39; The decision is made based on whether shortest_1 and shortest_2 share a subpath leading up to the edge which is being removed. &amp;#39;&lt;/p&gt; &lt;p&gt;in 33, edge removed at first is EG, and the only edge leading to E in shrtest_1 is C, but it is the root path so we keep it&lt;/p&gt; &lt;p&gt;my question, why we removed EF?&lt;/p&gt; &lt;p&gt;thanks for hel&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/the_graph_guy&quot;&gt; /u/the_graph_guy &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10auo6x/yens_algorithm_and_removing_edges/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10auo6x/yens_algorithm_and_removing_edges/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10auo6x</id><link href="https://www.reddit.com/r/algorithms/comments/10auo6x/yens_algorithm_and_removing_edges/" /><updated>2023-01-13T13:34:15+00:00</updated><published>2023-01-13T13:34:15+00:00</published><title>yens algorithm and removing edges</title></entry><entry><author><name>/u/OverDemon</name><uri>https://www.reddit.com/user/OverDemon</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I believe this is a half-theoretical, half-practical question as I&amp;#39;m working with a D* Lite planner in C++, but there&amp;#39;ll be no code in this post, of course. Sorry in advance for perhaps not using the precisely correct technical terms ^^&lt;/p&gt; &lt;p&gt;D* Lite finds a path by expanding nodes backwards (aka. from goal to start) and at the end we have something as the table below. The nodes that form the shortest path have been expanded and has a rhs- and g-value. The (x) nodes have rhs-values since they had updateVertex called on them as they were neighbors to the nodes that formed the shortest path, but no g-values yet as they were not the nodes with the smallest keys.&lt;/p&gt; &lt;table&gt;&lt;thead&gt; &lt;tr&gt; &lt;th align=&quot;left&quot;&gt;start&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;x&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;x&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;1&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;2&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;3&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;5&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;6&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;7&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;goal&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;Now, a path have been found from start to goal, however, suddenly an obstacle appear at (1), right in front of start before a move to start it made. So re-planning is initiated &lt;em&gt;(I know that D\&lt;/em&gt; Lite normally move first after a path is found before scanning for changes, but for testing purposes I reset start to the original position so I can compare results)*. &lt;/p&gt; &lt;p&gt;What happens in my program is that the re-planning produce a result like this:&lt;/p&gt; &lt;table&gt;&lt;thead&gt; &lt;tr&gt; &lt;th align=&quot;left&quot;&gt;start&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;1&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;x&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;x&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;Obs&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;2&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;3&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;5&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;6&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;7&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;8&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;x&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;*&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;goal&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;The numbered route (1-8) is the actual route that my program ends up choosing, (*) are nodes with an rhs- and g-value, and (x) nodes are have an rhs-value but a g-value of infinity.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What this post is about and what I&amp;#39;m not sure about is this:&lt;/strong&gt; (My) D* Lite starts by updating the start node and the (Obs) node, as expected, but then it proceed to move along all the nodes adjacent to the original path (starting down around goal), aka. the (*) nodes. And I&amp;#39;m not sure if this is how D* Lite is supposed to work or not?&lt;/p&gt; &lt;p&gt;And that&amp;#39;s basically what I&amp;#39;m wondering about. Whether this is how D* Lite is supposed to work or if I&amp;#39;ve missed something?&lt;/p&gt; &lt;p&gt;On a small map like this it&amp;#39;s no problem, but on larger maps having to basically double the amount of nodes with rhs- and g-values adds up in the time required.&lt;/p&gt; &lt;p&gt;I&amp;#39;m not sure what to think, D* Lite is not as A* or such. Not sure whether my test is build on a bad example. Whether it has something to do with the fact that whether it&amp;#39;s equally &amp;#39;cheap&amp;#39; to move along the side of the original path and then move inwards as it is to move inwards first...&lt;/p&gt; &lt;p&gt;Any help would be appreciated.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/OverDemon&quot;&gt; /u/OverDemon &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10a4yzq/can_it_be_true_that_d_lite_replanning_around_an/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/10a4yzq/can_it_be_true_that_d_lite_replanning_around_an/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_10a4yzq</id><link href="https://www.reddit.com/r/algorithms/comments/10a4yzq/can_it_be_true_that_d_lite_replanning_around_an/" /><updated>2023-01-12T17:16:21+00:00</updated><published>2023-01-12T17:16:21+00:00</published><title>Can it be true that D* Lite re-planning around an obstacles requires finding the g-values of lots of nodes adjacent to the original path?</title></entry><entry><author><name>/u/IsopodAutomatic6226</name><uri>https://www.reddit.com/user/IsopodAutomatic6226</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I have series of data and I want to efficiently extract statistics from slices of those series, like maximum, minimum, average, those kind of things. I wanted to avoid iterating over the slices every time to calculate those things. &lt;/p&gt; &lt;p&gt;What data structures or algorithms could I use?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/IsopodAutomatic6226&quot;&gt; /u/IsopodAutomatic6226 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/109jnk0/fast_statistics_from_big_slices_of_a_big_vector/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/109jnk0/fast_statistics_from_big_slices_of_a_big_vector/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_109jnk0</id><link href="https://www.reddit.com/r/algorithms/comments/109jnk0/fast_statistics_from_big_slices_of_a_big_vector/" /><updated>2023-01-11T23:34:00+00:00</updated><published>2023-01-11T23:34:00+00:00</published><title>Fast statistics from big slices of a big vector</title></entry><entry><author><name>/u/shiningmatcha</name><uri>https://www.reddit.com/user/shiningmatcha</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Consider an online English dictionary. When a search word is not found in its existing entries, a suggestion list of a few close matches is shown, as in &lt;em&gt;&amp;quot;Did you mean ... ?&amp;quot;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;First, what are some possible similarity metrics being used? I guess it&amp;#39;s not Levenshtein distance since it would take a time complexity of &lt;em&gt;O(STN)&lt;/em&gt;, where &lt;em&gt;S&lt;/em&gt; is the length of the search word, &lt;em&gt;T&lt;/em&gt; is the average word length for the English dictionary, and &lt;em&gt;N&lt;/em&gt; is the number of dictionary entries.&lt;/p&gt; &lt;p&gt;Second, how can this be implemented efficiently? Is there any preprocessing needed?&lt;/p&gt; &lt;p&gt;Are there some keywords for this problem?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/shiningmatcha&quot;&gt; /u/shiningmatcha &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/1099mn6/efficient_algorithms_for_finding_close_matches_of/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/1099mn6/efficient_algorithms_for_finding_close_matches_of/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1099mn6</id><link href="https://www.reddit.com/r/algorithms/comments/1099mn6/efficient_algorithms_for_finding_close_matches_of/" /><updated>2023-01-11T16:59:46+00:00</updated><published>2023-01-11T16:59:46+00:00</published><title>Efficient algorithms for finding close matches of an input string given a word dictionary?</title></entry><entry><author><name>/u/sayak_chakrabarty</name><uri>https://www.reddit.com/user/sayak_chakrabarty</uri></author><category term="algorithms" label="r/algorithms"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;We know that in the unweighted set cover problem, we have a $log n$ approximation algorithm. Now consider the geometric set cover problem &lt;a href=&quot;https://en.wikipedia.org/wiki/Geometric_set_cover_problem&quot;&gt;https://en.wikipedia.org/wiki/Geometric_set_cover_problem&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;#x200B;&lt;/p&gt; &lt;p&gt;It says there is a simple greedy algorithm for the one-dimension case, can anyone show me the analysis of that? I mean, what is the approximation factor?&lt;/p&gt; &lt;p&gt;&amp;#x200B;&lt;/p&gt; &lt;p&gt;Also, is there a constant approximation factor possible for the one-dimensional case if each of the sets in the family is an interval and the universe is the set of first n natural numbers? That is, is it possible to show that every set in the optimal solution intersects with at most constant many sets in the Greedy solution? Here I am talking about the usual greedy algorithm for set cover, we take the set that covers the most number of elements.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/sayak_chakrabarty&quot;&gt; /u/sayak_chakrabarty &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/109dtd4/geometric_set_cover/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/algorithms/comments/109dtd4/geometric_set_cover/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_109dtd4</id><link href="https://www.reddit.com/r/algorithms/comments/109dtd4/geometric_set_cover/" /><updated>2023-01-11T19:41:29+00:00</updated><published>2023-01-11T19:41:29+00:00</published><title>Geometric Set Cover</title></entry></feed>