Tributary

A tributary, or an affluent, is a stream or river that flows into a larger stream (main stem or "parent"), river, or a lake. A tributary does not flow directly into a sea or ocean. Tributaries, and the main stem river into which they flow, drain the surrounding drainage basin of its surface water and groundwater, leading the water out into an ocean, another river, or into an endorheic basin.
The Irtysh is a chief tributary of the Ob river and is also the longest tributary river in the world with a length of 4,248 km (2,640 mi). The Madeira River is the largest tributary river by volume in the world with an average discharge of 31,200 m/s (1.1 million cu ft/s).
A confluence, where two or more bodies of water meet, usually refers to the joining of tributaries.
The opposite to a tributary is a distributary, a river or stream that branches off from and flows away from the main stream. Distributaries are most often found in river deltas.
Right tributary, or right-bank tributary, and left tributary, or left-bank tributary, describe the orientation of the tributary relative to the flow of the main stem river. These terms are defined from the perspective of looking downstream, that is, facing the direction the water current of the main stem is going. In a navigational context, if one were floating on a raft or other vessel in the main stream, this would be the side the tributary enters from as one floats past; alternately, if one were floating down the tributary, the main stream meets it on the opposite bank of the tributary. This information may be used to avoid turbulent water by moving towards the opposite bank before approaching the confluence.
An early tributary is a tributary that joins the main stem river closer to its source than its mouth, that is, before the river's midpoint; a late tributary joins the main stem further downstream, closer to its mouth than to its source, that is, after the midpoint.
In the United States, where tributaries sometimes have the same name as the river into which they feed, they are called forks. These are typically designated by compass direction. For example, the American River in California receives flow from its North, Middle, and South forks. The Chicago River's North Branch has the East, West, and Middle Fork; the South Branch has its South Fork, and used to have a West Fork as well (now filled in).
Forks are sometimes designated as right or left. Here, the handedness is from the point of view of an observer facing upstream. For instance, Steer Creek has a left tributary which is called Right Fork Steer Creek.
These naming conventions are reflective of the circumstances of a particular river's identification and charting: people living along the banks of a river, with a name known to them, may then float down the river in exploration, and each tributary joining it as they pass by appears as a new river, to be given its own name, perhaps one already known to the people who live upon its banks. Conversely, explorers approaching a new land from the sea encounter its rivers at their mouths, where they name them on their charts, then, following a river upstream, encounter each tributary as a forking of the stream to the right and to the left, which then appear on their charts as such; or the streams are seen to diverge by the cardinal direction (north, south, east, or west) in which they proceed upstream, sometimes a third stream entering between two others is designated the middle fork; or the streams are distinguished by the relative height of one to the other, as one stream descending over a cataract into another becomes the upper fork, and the one it descends into, the lower; or by relative volume: the smaller stream designated the little fork, the larger either retaining its name unmodified, or receives the designation big.
Tributaries are sometimes listed starting with those nearest to the source of the river and ending with those nearest to the mouth of the river. The Strahler stream order examines the arrangement of tributaries in a hierarchy of first, second, third and higher orders, with the first-order tributary being typically the least in size. For example, a second-order tributary would be the result of two or more first-order tributaries combining to form the second-order tributary.
Another method is to list tributaries from mouth to source, in the form of a tree structure, stored as a tree data structure.