Double-precision floating-point format: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Grudgekeyper
Added how subnormal numbers are calculated
Line 1: Line 1:
The '''Ford&ndash;Fulkerson method''' is an [[algorithm]] which computes the [[maximum flow problem|maximum flow]] in a [[flow network]]. It was published in 1956 by [[L. R. Ford, Jr.]] and [[D. R. Fulkerson]].<ref>{{cite doi|10.4153/CJM-1956-045-5}}</ref> The name "Ford&ndash;Fulkerson" is often also used for the [[Edmonds&ndash;Karp algorithm]], which is a specialization of Ford&ndash;Fulkerson.
ΝΤΕΤΕΚΤΙΒ Αθήνα ΝΤΕΤΕΚΤΙΒ Με την τέχνη της γραφής ολοκληρωτικά χαμένη πλέον στο παιχνίδι. Το βλέπω κι από τα δικά μου γραπτά. Το ένα πιο γρήγορο και κλισέ από το άλλο. Σαν τις τηλεοπτικές σειρές του Δαλιανίδη που είχαν όλες τα ίδια αστεία. [http://detectives-greece.blogspot.com/2012/09/blog-post.html ΝΤΕΤΕΚΤΙΒ] Αυτά τις καλές εποχές γιατί πλέον, μη νομίζεις φίλε, κι εγώ έχω συντάξει πολλά κείμενα τύπου "στην τσίτα η Κοντσίτα" για να βγάλω το ψωμάκι μου.


The idea behind the algorithm is as follows: As long as there is a path from the source (start node) to the sink (end node), with available capacity on all edges in the path, we send flow along one of these paths. Then we find another path, and so on. A path with available capacity is called an [[augmenting path]].
Ανώνυμα εννοείται γιατί άντε μετά να σε διαβάσει ο άλλος σοβαρά. Και τηλεόραση να μου ζήταγαν να κάνω ως πανελίστας θα το έκανα. Καρφί δεν μου καίγεται αν με κράξει το μισό και καλά εστετίστικο και προοδευτικό καναπεδάτο κοινό του facebook την ώρα που εγώ προσπαθώ να επιβιώσω χωρίς να προσβάλλω κανέναν, εκτός ίσως από τον εαυτό μου.


==Algorithm==
ΝΤΕΤΕΚΤΙΒ Ο τηλεκριτικός που αναλύει γιατί δεν πήγε καλά το Your Face Sounds Familiar; Ο πάντα διαπλεκόμενος πολιτικός συντάκτης που επειδή όποτε έχει αποφάγια στο σπίτι του ένας υπουργός και τον καλεί για να του περάσει "γραμμή", ο άλλος αισθάνεται παράγοντας; Ο αθλητικός συντάκτης με τους ευφάνταστους τίτλους "Γκολάρα που τσούζει έβαλε ο θεός"; Ο τριτοξάδερφος του γέροντα Παϊσιου που έχει αναλάβει να μας ενημερώνει καθημερινά για τις προφητείες του; Ο φασίστας του "Στόχου" που δημοσιεύει τη φωτογραφία μου με την λεζάντα "προκαλεί πάλι ο αρχικίναιδος δημοσιογράφος"; ΝΤΕΤΕΚΤΙΒ Περισσότερα για την πλοκή δεν χρειάζεται να ειπωθούν, προκειμένου να διαφυλαχθεί και το μυστήριο του πράγματος.
Let <math>G(V,E)</math> be a graph, and for each edge from <math>u</math> to <math>v</math>, let <math>c(u,v)</math> be the capacity and <math>f(u,v)</math> be the flow. We want to find the maximum flow from the source <math>s</math> to the sink <math>t</math>. After every step in the algorithm the following is maintained:


:{|
Ούτως η άλλως, το βασικό ατού της σειράς δεν είναι εκεί. Αυτό βρίσκεται στη δραματική τελειότητα που επιτυγχάνεται χάρη στις εξαιρετικές ερμηνείες –η Ελίζαμπεθ Μος («Mad Men») είναι απόλυτα πειστική στο ρόλο της ντετέκτιβ–, τους προσεγμένους δευτερεύοντες χαρακτήρες και τη μίνιμαλ σεναριακή και σκηνοθετική προσέγγιση της Κάμπιον.
| '''Capacity constraints''': || <math>\forall (u, v) \in E \ f(u,v) \le c(u,v)</math> || The flow along an edge can not exceed its capacity.
|-
| '''Skew symmetry''': || <math>\forall (u, v) \in E \ f(u,v) = - f(v,u)</math> || The net flow from <math>u</math> to <math>v</math> must be the opposite of the net flow from <math>v</math> to <math>u</math> (see example).
|-
| '''Flow conservation''': || <math style="vertical-align:-125%;">\forall u \in V: u \neq s \text{ and } u \neq t \Rightarrow \sum_{w \in V} f(u,w) = 0</math> || That is, unless <math>u</math> is <math>s</math> or <math>t</math>. The net flow to a node is zero, except for the source, which "produces" flow, and the sink, which "consumes" flow.
|}


This means that the flow through the network is a ''legal flow'' after each round in the algorithm. We define the '''residual network''' <math>G_f(V,E_f)</math> to be the network with capacity <math>c_f(u,v) = c(u,v) - f(u,v)</math> and no flow. Notice that it can happen that a flow from <math>v</math> to <math>u</math> is allowed in the residual
Τα φιλοσοφικά και κοινωνικά ζητήματα είναι επίσης εκεί. «Παρόλο που πρόκειται για ιστορία εγκλήματος και μυστηρίου, το αληθινό μυστήριο είναι πάντα το ευρύτερο, εκείνο που μιλά για το τι κάνουμε όλοι εμείς εδώ, πώς λειτουργούν τα πράγματα κι αν τελικά ποτέ θα καταλάβουμε οριστικά τι συμβαίνει», δηλώνει η Κάμπιον.
network, though disallowed in the original network: if <math>f(u,v)>0</math> and <math>c(v,u)=0</math> then
<math>c_f(v,u)=c(v,u)-f(v,u)=f(u,v)>0</math>.


'''Algorithm''' Ford&ndash;Fulkerson
ΝΤΕΤΕΚΤΙΒ ΑΙΜΙΛΙΟΣ ΧΑΡΜΠΗΣ ΝΤΕΤΕΚΤΙΒ Η Ελίζαμπεθ Μος, γνωστή από τους τηλεοπτικούς «Mad Men», στον ρόλο μιας ντετέκτιβ με τραυματικό παρελθόν που ερευνά μια υπόθεση παιδεραστίας. ΝΤΕΤΕΚΤΙΒ Στον αντίποδα της μεγαλειώδους φύσης, η ποταπή πλευρά των ανθρώπων.
:'''Inputs''' Graph <math>G</math> with flow capacity <math>c</math>, a source node <math>s</math>, and a sink node <math>t</math>
:'''Output''' A flow <math>f</math> from <math>s</math> to <math>t</math> which is a maximum
:# <math>f(u,v) \leftarrow 0</math> for all edges <math>(u,v)</math>
:# While there is a path <math>p</math> from <math>s</math> to <math>t</math> in <math>G_f</math>, such that <math>c_f(u,v) > 0</math> for all edges <math>(u,v) \in p</math>:
:## Find <math>c_f(p) = \min\{c_f(u,v) : (u,v) \in p\}</math>
:## For each edge <math>(u,v) \in p</math>
:### <math>f(u,v) \leftarrow f(u,v) + c_f(p)</math> (''Send flow along the path'')
:### <math>f(v,u) \leftarrow f(v,u) - c_f(p)</math> (''The flow might be "returned" later'')


The path in step 2 can be found with for example a [[breadth-first search]] or a [[depth-first search]] in <math>G_f(V,E_f)</math>. If you use the former, the algorithm is called [[Edmonds–Karp algorithm|Edmonds–Karp]].
Ενα δωδεκάχρονο κορίτσι προσπαθεί να αυτοκτονήσει στη λίμνη. Τελικά θα σωθεί για να αποδειχτεί στη συνέχεια ότι είναι έγκυος. Μια ντετέκτιβ που επιστρέφει στην περιοχή για να δει την ετοιμοθάνατη μητέρα της θα αναλάβει την υπόθεση ερχόμενη σε σύγκρουση με τους τοπικούς παράγοντες και κυρίως με τον πατέρα της μικρής, τον σοβινιστή πατριάρχη Ματ Μίτσαμ, αντικείμενο φόβου και συνάμα σεβασμού για όλους.


When no more paths in step 2 can be found, <math>s</math> will not be able to reach <math>t</math> in the residual
Ταυτόχρονα μια ομάδα «πληγωμένων» γυναικών, μεσήλικων στην πλειονότητά τους, βρίσκουν καταφύγιο στην άκρη της λίμνης σε μια τοποθεσία με τη συμβολική ονομασία Παράδεισος. Εκεί ζουν σε ένα είδος κοινοβίου υπό την αφηρημένα σοφή καθοδήγηση της μυστηριώδους GJ, χαρακτήρας-αντίβαρο κατά κάποιον τρόπο στον πρωτογονισμό και τη βαρβαρότητα του Μίτσαμ (την υποδύεται η Χόλι Χάντερ).
network. If <math>S</math> is the set of nodes reachable by <math>s</math> in the residual network, then the total
capacity in the original network of edges from <math>S</math> to the remainder of <math>V</math> is on the one hand
equal to the total flow we found from <math>s</math> to <math>t</math>,
and on the other hand serves as an upper bound for all such flows.
This proves that the flow we found is maximal. See also [[Max-flow min-cut theorem|Max-flow Min-cut theorem]].


If the graph <math>G(V,E)</math> has multi Sources and Sinks, we act as follows.
  ΝΤΕΤΕΚΤΙΒ Δεν γουστάρω να με αποκαλούν δημοσιογράφο επειδή πρώτα απ' όλα δεν είμαι. Για να το γράψω πιο καθαρά, δεν ξέρω καν τι είναι δημοσιογράφος. Αυτός που γράφει για τους πισινούς των επωνύμων στην παραλία; Ο ρεπόρτερ που κυνηγά με την κάμερα τη μάνα του δολοφονημένου για να τη ρωτήσει "πως αισθάνεστε;" "Άγχος παιδί μου αισθάνομαι γιατί δεν θα προλάβω να κλείσω κομμωτήριο να κάνω μαλλί για την κηδεία του γιου μου".
Suppose that <math>T=\{t|t\; is \;a\; sink \}</math> and <math>S=\{s|s \;is \;a\; source\}</math>. Add a new source <math> s^*</math> with an edge <math>(s^*,s)</math> from <math>s^* </math> to every node <math> s\in S </math>, with capacity <math>f(s^*,s)=d_s\;(d_s=\sum_{(s,u)\in E}f(s,u))</math> . And add a new sink <math> t^*</math> with an edge <math>(t^*,t)</math> from <math>t^* </math> to every node <math> t\in T </math>, with capacity <math>f(t^*,t)=d_t\;(d_t=\sum_{(v,t)\in E}f(v,t))</math>. Then applying the Ford&ndash;Fulkerson algorithm.
 
Also if every nodes <math>u</math> has constraint <math>d_u </math>, we replace this node with two nodes <math>u_{in},u_{out} </math>, and an edge <math> (u_{in},u_{out}) </math>, with capacity <math>f(u_{in},u_{out})=d_u</math>. and then applying the Ford&ndash;Fulkerson algorithm.
 
==Complexity==
By adding the flow augmenting path to the flow already established in the graph, the maximum flow will be reached when no more flow augmenting paths can be found in the graph. However, there is no certainty that this situation will ever be reached, so the best that can be guaranteed is that the answer will be correct if the algorithm terminates.  In the case that the algorithm runs forever, the flow might not even converge towards the maximum flow.  However, this situation only occurs with irrational flow values. When the capacities are integers, the runtime of Ford-Fulkerson is bounded by <math>O(E f)</math> (see [[big O notation]]), where <math>E</math> is the number of edges in the graph and <math>f</math> is the maximum flow in the graph. This is because each augmenting path can be found in <math>O(E)</math> time and increases the flow by an integer amount which is at least <math>1</math>.
 
A variation of the Ford&ndash;Fulkerson algorithm with guaranteed termination and a runtime independent of the maximum flow value is the [[Edmonds–Karp algorithm]], which runs in <math>O(VE^2)</math> time.
 
==Integral example==
 
The following example shows the first steps of Ford–Fulkerson in a flow network with 4 nodes, source <math>A</math> and sink <math>D</math>. This example shows the worst-case behaviour of the algorithm. In each step, only a flow of <math>1</math> is sent across the network. If breadth-first-search were used instead, only two steps would be needed.
 
{| cellpadding="10"
|- style="text-align:center"
! Path
! Capacity
! Resulting flow network
|-
| colspan="2" style="text-align:center" | Initial flow network
| [[Image:Ford-Fulkerson example 0.svg|300px]]
|-
| <math>A,B,C,D</math></td>
| <math>\min(c_f(A,B), c_f(B,C), c_f(C,D))=</math><br />
<math>\min(c(A,B)-f(A,B) ,c(B,C)-f(B,C), c(C,D)-f(C,D))=</math><br />
<math>\min(1000-0, 1-0, 1000-0)=1</math>
| [[Image:Ford-Fulkerson example 1.svg|300px]]
|-
| <math>A,C,B,D</math>
| <math>\min(c_f(A,C), c_f(C,B), c_f(B,D))=</math><br />
<math>\min(c(A,C)-f(A,C), c(C,B)-f(C,B), c(B,D)-f(B,D))=</math><br />
<math>\min(1000-0, 0-(-1), 1000-0)=1</math>
| [[Image:Ford-Fulkerson example 2.svg|300px]]
|-
| colspan="3" style="text-align:center" | After 1998 more steps …
|-
| colspan="2" style="text-align:center" | Final flow network
| [[Image:Ford-Fulkerson example final.svg|300px]]
|}
 
Notice how flow is "pushed back" from <math>C</math> to <math>B</math> when finding the path <math>A,C,B,D</math>.
 
==Non-terminating example==
 
[[File:Ford-Fulkerson forever.svg|right]]
 
Consider the flow network shown on the right, with source <math>s</math>, sink <math>t</math>, capacities of edges <math>e_1</math>, <math>e_2</math> and <math>e_3</math> respectively <math>1</math>, <math>r=(\sqrt{5}-1)/2</math> and <math>1</math> and the capacity of all other edges some integer <math>M \ge 2</math>. The constant <math>r</math> was chosen so, that <math>r^2 = 1 - r</math>. We use augmenting paths according to the following table, where <math>p_1 = \{ s, v_4, v_3, v_2, v_1, t \}</math>, <math>p_2 = \{ s, v_2, v_3, v_4, t \}</math> and <math>p_3 = \{ s, v_1, v_2, v_3, t \}</math>.
 
{| class="wikitable" style="text-align: center"
! rowspan=2 | Step !! rowspan=2 | Augmenting path !! rowspan=2 | Sent flow !! colspan=3 | Residual capacities
|-
! <math>e_1</math> !! <math>e_2</math> !! <math>e_3</math>
|-
| 0 || || || <math>r^0=1</math> || <math>r</math> || <math>1</math>
|-
| 1 || <math>\{ s, v_2, v_3, t \}</math> || <math>1</math> || <math>r^0</math> || <math>r^1</math> || <math>0</math>
|-
| 2 || <math>p_1</math> || <math>r^1</math> || <math>r^2</math> || <math>0</math> || <math>r^1</math>
|-
| 3 || <math>p_2</math> || <math>r^1</math> || <math>r^2</math> || <math>r^1</math> || <math>0</math>
|-
| 4 || <math>p_1</math> || <math>r^2</math> || <math>0</math> || <math>r^3</math> || <math>r^2</math>
|-
| 5 || <math>p_3</math> || <math>r^2</math> || <math>r^2</math> || <math>r^3</math> || <math>0</math>
|}
 
Note that after step 1 as well as after step 5, the residual capacities of edges <math>e_1</math>, <math>e_2</math> and <math>e_3</math> are in the form <math>r^n</math>, <math>r^{n+1}</math> and <math>0</math>, respectively, for some <math>n \in \mathbb{N}</math>. This means that we can use augmenting paths <math>p_1</math>, <math>p_2</math>, <math>p_1</math> and <math>p_3</math> infinitely many times and residual capacities of these edges will always be in the same form. Total flow in the network after step 5 is <math>1 + 2(r^1 + r^2)</math>. If we continue to use augmenting paths as above, the total flow converges to <math>\textstyle 1 + 2\sum_{i=1}^\infty r^i = 3 + 2r</math>, while the maximum flow is <math>2M + 1</math>. In this case, the algorithm never terminates and the flow doesn't even converge to the maximum flow.<ref>{{cite journal| title = The smallest networks on which the Ford-Fulkerson maximum flow procedure may fail to terminate | first = Uri | last = Zwick | journal = [[Theoretical Computer Science (journal)|Theoretical Computer Science]] | volume = 148 | issue = 1 | date = 21 August 1995 | pages = 165–170 | doi = 10.1016/0304-3975(95)00022-O}}</ref>
 
{{clear}}
 
== Python implementation  ==
<source lang="python">
class Edge(object):
    def __init__(self, u, v, w):
        self.source = u
        self.sink = v 
        self.capacity = w
    def __repr__(self):
        return "%s->%s:%s" % (self.source, self.sink, self.capacity)
 
class FlowNetwork(object):
    def __init__(self):
        self.adj = {}
        self.flow = {}
    def add_vertex(self, vertex):
        self.adj[vertex] = []
    def get_edges(self, v):
        return self.adj[v]
    def add_edge(self, u, v, w=0):
        if u == v:
            raise ValueError("u == v")
        edge = Edge(u,v,w)
        redge = Edge(v,u,0)
        edge.redge = redge  #redge is not defined in Edge class
        redge.redge = edge
        self.adj[u].append(edge)
        self.adj[v].append(redge)
        self.flow[edge] = 0
        self.flow[redge] = 0
    def find_path(self, source, sink, path):
        if source == sink:
            return path
        for edge in self.get_edges(source):
            residual = edge.capacity - self.flow[edge]
            if residual > 0 and not edge in path:
                result = self.find_path( edge.sink, sink, path + [edge])
                if result != None:
                    return result
    def max_flow(self, source, sink):
        path = self.find_path(source, sink, [])
        while path != None:
            residuals = [edge.capacity - self.flow[edge] for edge in path]
            flow = min(residuals)
            for edge in path:
                self.flow[edge] += flow
                self.flow[edge.redge] -= flow
            path = self.find_path(source, sink, [])
        return sum(self.flow[edge] for edge in self.get_edges(source))
</source>
 
===Usage example===
For the example flow network in [[maximum flow problem]] we do the following:
 
<source lang="python">
>>> g = FlowNetwork()
>>> [g.add_vertex(v) for v in "sopqrt"]
[None, None, None, None, None, None]
>>> g.add_edge('s','o',3)
>>> g.add_edge('s','p',3)
>>> g.add_edge('o','p',2)
>>> g.add_edge('o','q',3)
>>> g.add_edge('p','r',2)
>>> g.add_edge('r','t',3)
>>> g.add_edge('q','r',4)
>>> g.add_edge('q','t',2)
>>> print g.max_flow('s','t')
5
</source>
 
== Notes ==
{{reflist}}
 
== References ==
* {{cite book
| first1 = Thomas H.
| last1 = Cormen
| authorlink1 = Thomas H. Cormen
| first2 = Charles E.
| last2 = Leiserson
| authorlink2 = Charles E. Leiserson
| first3 = Ronald L.
| last3 = Rivest
| authorlink3 = Ronald L. Rivest
| first4 = Clifford
| last4 = Stein
| authorlink4 = Clifford Stein
| title = [[Introduction to Algorithms]]
| edition = Second
| publisher = MIT Press and McGraw&ndash;Hill
| year = 2001
| isbn = 0-262-03293-7
| chapter = Section 26.2: The Ford&ndash;Fulkerson method
| pages = 651&ndash;664
}}
* {{cite book | author=George T. Heineman, Gary Pollice, and Stanley Selkow | title= Algorithms in a Nutshell | publisher=[[Oreilly Media]] | year=2008 | chapter=Chapter 8:Network Flow Algorithms | pages = 226–250 | isbn=978-0-596-51624-6 }}
* {{cite book | author=Jon Kleinberg and Éva Tardos | title= Algorithm Design | publisher=
Pearson Education | year=2006 | chapter=Chapter 7:Extensions to the Maximum-Flow Problem | pages = 378-384 | isbn=0-321-29535-8  }}
 
==External links==
* [http://www.cs.pitt.edu/~kirk/cs1501/animations/Network.html Another Java animation]
* [http://rrusin.blogspot.com/2011/03/implementing-graph-editor-in-javafx.html Java Web Start application]
{{commonscat-inline}}
 
{{DEFAULTSORT:Ford-Fulkerson Algorithm}}
[[Category:Network flow]]
[[Category:Articles with example pseudocode]]
[[Category:Graph algorithms]]

Revision as of 16:31, 4 March 2014

ΝΤΕΤΕΚΤΙΒ Αθήνα ΝΤΕΤΕΚΤΙΒ Με την τέχνη της γραφής ολοκληρωτικά χαμένη πλέον στο παιχνίδι. Το βλέπω κι από τα δικά μου γραπτά. Το ένα πιο γρήγορο και κλισέ από το άλλο. Σαν τις τηλεοπτικές σειρές του Δαλιανίδη που είχαν όλες τα ίδια αστεία. ΝΤΕΤΕΚΤΙΒ Αυτά τις καλές εποχές γιατί πλέον, μη νομίζεις φίλε, κι εγώ έχω συντάξει πολλά κείμενα τύπου "στην τσίτα η Κοντσίτα" για να βγάλω το ψωμάκι μου.

Ανώνυμα εννοείται γιατί άντε μετά να σε διαβάσει ο άλλος σοβαρά. Και τηλεόραση να μου ζήταγαν να κάνω ως πανελίστας θα το έκανα. Καρφί δεν μου καίγεται αν με κράξει το μισό και καλά εστετίστικο και προοδευτικό καναπεδάτο κοινό του facebook την ώρα που εγώ προσπαθώ να επιβιώσω χωρίς να προσβάλλω κανέναν, εκτός ίσως από τον εαυτό μου.
ΝΤΕΤΕΚΤΙΒ Ο τηλεκριτικός που αναλύει γιατί δεν πήγε καλά το Your Face Sounds Familiar; Ο πάντα διαπλεκόμενος πολιτικός συντάκτης που επειδή όποτε έχει αποφάγια στο σπίτι του ένας υπουργός και τον καλεί για να του περάσει "γραμμή", ο άλλος αισθάνεται παράγοντας; Ο αθλητικός συντάκτης με τους ευφάνταστους τίτλους "Γκολάρα που τσούζει έβαλε ο θεός"; Ο τριτοξάδερφος του γέροντα Παϊσιου που έχει αναλάβει να μας ενημερώνει καθημερινά για τις προφητείες του; Ο φασίστας του "Στόχου" που δημοσιεύει τη φωτογραφία μου με την λεζάντα "προκαλεί πάλι ο αρχικίναιδος δημοσιογράφος"; ΝΤΕΤΕΚΤΙΒ Περισσότερα για την πλοκή δεν χρειάζεται να ειπωθούν, προκειμένου να διαφυλαχθεί και το μυστήριο του πράγματος.
Ούτως η άλλως, το βασικό ατού της σειράς δεν είναι εκεί. Αυτό βρίσκεται στη δραματική τελειότητα που επιτυγχάνεται χάρη στις εξαιρετικές ερμηνείες –η Ελίζαμπεθ Μος («Mad Men») είναι απόλυτα πειστική στο ρόλο της ντετέκτιβ–, τους προσεγμένους δευτερεύοντες χαρακτήρες και τη μίνιμαλ σεναριακή και σκηνοθετική προσέγγιση της Κάμπιον.
Τα φιλοσοφικά και κοινωνικά ζητήματα είναι επίσης εκεί. «Παρόλο που πρόκειται για ιστορία εγκλήματος και μυστηρίου, το αληθινό μυστήριο είναι πάντα το ευρύτερο, εκείνο που μιλά για το τι κάνουμε όλοι εμείς εδώ, πώς λειτουργούν τα πράγματα κι αν τελικά ποτέ θα καταλάβουμε οριστικά τι συμβαίνει», δηλώνει η Κάμπιον.
ΝΤΕΤΕΚΤΙΒ ΑΙΜΙΛΙΟΣ ΧΑΡΜΠΗΣ ΝΤΕΤΕΚΤΙΒ Η Ελίζαμπεθ Μος, γνωστή από τους τηλεοπτικούς «Mad Men», στον ρόλο μιας ντετέκτιβ με τραυματικό παρελθόν που ερευνά μια υπόθεση παιδεραστίας. ΝΤΕΤΕΚΤΙΒ Στον αντίποδα της μεγαλειώδους φύσης, η ποταπή πλευρά των ανθρώπων.
Ενα δωδεκάχρονο κορίτσι προσπαθεί να αυτοκτονήσει στη λίμνη. Τελικά θα σωθεί για να αποδειχτεί στη συνέχεια ότι είναι έγκυος. Μια ντετέκτιβ που επιστρέφει στην περιοχή για να δει την ετοιμοθάνατη μητέρα της θα αναλάβει την υπόθεση ερχόμενη σε σύγκρουση με τους τοπικούς παράγοντες και κυρίως με τον πατέρα της μικρής, τον σοβινιστή πατριάρχη Ματ Μίτσαμ, αντικείμενο φόβου και συνάμα σεβασμού για όλους.
Ταυτόχρονα μια ομάδα «πληγωμένων» γυναικών, μεσήλικων στην πλειονότητά τους, βρίσκουν καταφύγιο στην άκρη της λίμνης σε μια τοποθεσία με τη συμβολική ονομασία Παράδεισος. Εκεί ζουν σε ένα είδος κοινοβίου υπό την αφηρημένα σοφή καθοδήγηση της μυστηριώδους GJ, χαρακτήρας-αντίβαρο κατά κάποιον τρόπο στον πρωτογονισμό και τη βαρβαρότητα του Μίτσαμ (την υποδύεται η Χόλι Χάντερ).
ΝΤΕΤΕΚΤΙΒ Δεν γουστάρω να με αποκαλούν δημοσιογράφο επειδή πρώτα απ' όλα δεν είμαι. Για να το γράψω πιο καθαρά, δεν ξέρω καν τι είναι δημοσιογράφος. Αυτός που γράφει για τους πισινούς των επωνύμων στην παραλία; Ο ρεπόρτερ που κυνηγά με την κάμερα τη μάνα του δολοφονημένου για να τη ρωτήσει "πως αισθάνεστε;" "Άγχος παιδί μου αισθάνομαι γιατί δεν θα προλάβω να κλείσω κομμωτήριο να κάνω μαλλί για την κηδεία του γιου μου".