The along-strike rupture time is , where is rupture velocity. Taking a representative crustal gives about s for a km unilateral finite-source rupture. A different assumed rupture velocity changes this estimate. The local slip rise time at one patch is not specified and need not equal the whole-fault rupture time.
For comparable distance and ground conditions, the eastern observer lies in the forward rupture directivity direction. Radiation from successive patches arrives closer together, producing a shorter, more concentrated and generally larger-amplitude ground-velocity pulse. The western observer receives the contributions spread over a longer interval, generally with less concentrated shaking. This concerns pulse duration and amplitude; it does not imply an equally large permanent displacement at the eastern site.[ref]
What is Directivity by United States Geological Survey. Explanation of constructive interference and the relation of rupture speed to S-wave speed
For distant observers approximately along strike, an elementary seismic travel time construction giveswhere is the shear-wave velocity. With and , these propagation contributions are about and s, respectively; finite local rise time broadens them. Double-couple radiation pattern, receiver geometry and local site response can change the observed amplitudes, so location east or west alone is not an unconditional intensity prediction.
Assuming pure dip-slip faulting, use an east–west striking, north-dipping normal fault, with the northern hanging wall moving down dip. In a right-hand-rule strike convention this is strike , dip , rake . The auxiliary nodal plane strikes east–west and dips south. The focal mechanism has a predominantly vertical P axis and a predominantly north–south horizontal T axis; the steep central direction is dilatational.
Original lower-hemisphere normal-fault focal mechanism: black compression, white dilatation, and two alternative nodal planes
. Details. The sketch is a double-couple seismic moment tensor calculation, not a claim that first motions uniquely identify which nodal plane slipped. The mapped north-dipping surface supplies that additional geological choice.
The visible surface can be an exhumed fault surface, rather than an unrelated hillslope that happens to intersect a buried plane. Downward motion of the hanging wall exposes the footwall face; repeated displacement and removal of loose material can reveal a substantial length of the same fault plane. Where exposure is renewed faster than weathering, erosion and collapse erase it, that planar surface remains part of the hillside. The less weathered lower face and rougher, vegetated upper ground are consistent with differential exposure, though the photograph alone does not date individual events.
At greater distance or over longer times, erosion modifies the slope and the hillside will cross or obscure the fault plane. The correspondence is therefore a transient competition between fault slip, exhumation and surface processes, not a requirement that all hillslopes follow faults.
A numerical answer needs an assumption about fault orientation. For a cohesionless fault optimally oriented for Mohr-Coulomb failure criterion, with vertical , write for the internal friction angle and for the fault dip. The angle between the plane and is , so the optimal normal-fault dip relation givesHence under that model.
For the Mohr circle, plot effective compression horizontally and shear stress vertically. Draw a circle with diameter tangent to . Its centre and radius obey . One illustrative normalization is , , with tangency at the resolved stresses on the plane. Pore fluid pressure shifts the total-stress circle horizontally; the friction law uses effective stress.
Original normalized Mohr circles for optimally oriented normal faults: different dips imply different tangent slopes only under the stated failure model
. Details. The dip does not determine the actual sliding coefficient of friction without the optimal-orientation assumption. A reactivated inherited plane may be nonoptimal, cohesion may matter, and the stress ratio and pore fluid pressure are not measured. For an arbitrary compression-positive stress state,at cohesionless sliding. Thus the requested single value is a conditional inference, not a friction measurement.
A normal fault is the plausible interpretation. The photograph shows a steep, exposed planar rock face with lower ground on its open side; this geometry is consistent with an exhumed footwall and a down-dropped hanging wall. A steep dip alone is not a unique indicator of shear sense, and the photograph does not supply a displaced marker proving the sense independently. Under an Andersonian faulting regime, a plausible maximum compression is approximately vertical, with horizontal in the extension direction and approximately along strike.
A
Rel3 provides only a membership test for a supplied pair. It gives no way to enumerate the finite middle carrier Y, enumerate one element's relatives, or even obtain a first value of type Y. Finiteness alone supplies no generic enumeration operation. To answer the existential query for the composed relation, supply a complete finite enumeration of the middle carrier explicitly:def compose3[X, Y, Z](r: Rel3[X, Y], s: Rel3[Y, Z],
middleValues: List[Y]): Rel3[X, Z] = {
val witnesses = middleValues.distinct
new Rel3[X, Z] {
def related(x: X, z: Z): Boolean =
witnesses.exists(y => r.related(x, y) && s.related(y, z))
}
}The precondition is that
middleValues contains every admissible middle value, or at least every possible witness. Extra irrelevant values do not change the answer if the two membership tests are defined for them. The postcondition is precisely . .exists and && use short-circuit evaluation; with an empty middle carrier, the answer is false. Each query uses at most pairs of membership tests, apart from the one-time duplicate elimination.An alternative interface can expose
def rightDomain: List[Y] together with the first predicate, with an explicit completeness contract. Such an output position is incompatible with retaining a contravariant Y in that extended trait, so its variance must be reconsidered. Passing the enumeration separately leaves the safe base Rel3[-X,-Y] unchanged.The information gap is substantive. A black-box algorithm making finitely many membership queries cannot rule out a witness at an unexamined middle value: two relations can agree on every inspected pair while differing only by a fresh witness that makes the composition true. A finite but unenumerated carrier can be enlarged to include that witness. A complete explicit enumeration, a known traversable carrier, or an equivalent relatives-enumeration interface removes this obstruction. This is finite-domain composition from relation predicates, rather than a problem solvable merely by nesting the two Boolean-valued methods.
For each requested
x, enumerate its middle relatives and then each middle value's relatives in the second relation:def compose2[X, Y, Z](r: Rel2[X, Y], s: Rel2[Y, Z]): Rel2[X, Z] =
new Rel2[X, Z] {
def relatives(x: X): List[Z] =
r.relatives(x).flatMap(y => s.relatives(y)).distinct
}A returned
z is present exactly when some enumerated y witnesses the two relation memberships. Conversely, every such witness appears in r.relatives(x), and its z appears in s.relatives(y), so no composed relative is omitted. .distinct removes repeated endpoints, including repetitions produced through different witnesses. This is the same composition of relations as part (b), represented one queried row at a time. Neither the entire first carrier nor the entire result must be enumerated in advance. The relation operations must remain consistent while the returned view is used; changing their underlying state would make this a live view rather than a snapshot.Join on equal middle components, produce the outer pair, and eliminate duplicate outputs. Using the variant declarations from part (a):
def compose1[X, Y, Z](r: Rel1[X, Y], s: Rel1[Y, Z]): Rel1[X, Z] = {
val joined = (for {
(x, y) <- r.pairs
(middle, z) <- s.pairs
if y == middle
} yield (x, z)).distinct
new Rel1[X, Z] {
val pairs: List[(X, Z)] = joined
}
}Every produced pair has a witness
y with both required input pairs, proving soundness. Conversely, any witness for a composed pair occurs in the two input lists, so the nested traversal produces that pair; .distinct retains one occurrence, proving completeness. Thus the result represents , with each pair listed once, even if either input lists duplicates or several witnesses yield the same outer pair. Equality of middle values is assumed to implement the relation's intended key equality. The nested join examines candidate pairs before duplicate elimination.The maximally variant safe declarations are:
trait Rel1[+X, +Y] { val pairs: List[(X, Y)] }
trait Rel2[-X, +Y] { def relatives(x: X): List[Y] }
trait Rel3[-X, -Y] { def related(x: X, y: Y): Boolean }Leaving one or both parameters invariant is also legal but admits fewer subtyping conversions. These are type variance annotations.
For
Rel1, both parameters occur only as outputs. Scala's immutable List and Tuple2 are covariant, so a list of pairs of narrower types can safely be read as pairs of broader types. Thus both may be covariant type parameters. A contravariant declaration would permit, for example, treating a Rel1[Any, Int] containing (7, 0) as a Rel1[String, Int], then reading its first component as a String. That would be unsound; the compiler rejects the negative annotation at this output position.For
Rel2, X occurs as a method argument and therefore may be a contravariant type parameter; Y is returned in an immutable list and may be a covariant type parameter. A function that accepts every Any is safe to use where only String queries are issued. The opposite direction would be unsafe: if X were covariant, the following hypothetical conversion could call a string-only implementation with an integer:val strings: Rel2[String, Int] = new Rel2[String, Int] {
def relatives(x: String): List[Int] = List(x.length)
}
// Unsafe if Rel2 were incorrectly covariant in X:
// val arbitrary: Rel2[Any, Int] = strings
// arbitrary.relatives(7)Making
Y contravariant would instead allow an integer-valued Rel2[String, Any] to be read as a string-valued Rel2[String, String], recreating the output error.For
Rel3, both generic values are consumed and only a Boolean function result is produced, so both may be contravariant type parameters. A predicate accepting all values of broad types can answer queries restricted to narrower types. Covariance in either parameter would allow passing an unsupported value to a specialized implementation. For example, treating a string-only first-argument predicate as accepting Any would permit related(7, y) even though its body might call x.length. These are applications of the variance-position rule: method inputs reverse variance, whereas immutable outputs preserve it.[ref]Scala 2.13 variance annotations specification. Variance annotations and the change of position in method parameter types
Use a customer object with no selected platforms as the base component, and wrap it once for each selected channel. Each decorator object has the same interface, delegates existing work, adds one platform send, and adds that platform's per-message charge. The code below uses the
Customer and Comms interfaces from the question; every decorator receives the communication implementation explicitly.final class NoChannels(val name: String) extends Customer {
def spread(msg: String): Unit = ()
def cost: Double = 0.0
}
abstract class CustomerDecorator(protected val inner: Customer)
extends Customer {
final val name: String = inner.name
def spread(msg: String): Unit = inner.spread(msg)
def cost: Double = inner.cost
}
final class OnDiscord(c: Customer, out: Comms)
extends CustomerDecorator(c) {
override def spread(msg: String): Unit = {
super.spread(msg)
out.sendD(name, msg)
}
override def cost: Double = super.cost + 0.01
}
final class OnFacebook(c: Customer, out: Comms)
extends CustomerDecorator(c) {
override def spread(msg: String): Unit = {
super.spread(msg)
out.sendF(name, msg)
}
override def cost: Double = super.cost + 0.05
}
final class OnWhatsApp(c: Customer, out: Comms)
extends CustomerDecorator(c) {
override def spread(msg: String): Unit = {
super.spread(msg)
out.sendW(name, msg)
}
override def cost: Double = super.cost + 0.03
}
def customer(name: String, discord: Boolean, facebook: Boolean,
whatsapp: Boolean, out: Comms): Customer = {
var c: Customer = new NoChannels(name)
if (discord) c = new OnDiscord(c, out)
if (facebook) c = new OnFacebook(c, out)
if (whatsapp) c = new OnWhatsApp(c, out)
c
}The factory admits each platform at most once, matching a subset of preferences. For example,
customer("reader", true, false, true, out) sends once to Discord and once to WhatsApp and has cost per message, using the stipulated charges. The innermost wrapper executes first, giving deterministic Discord–Facebook–WhatsApp order for selected channels. The zero-platform case sends nothing and costs zero. Repeated messages reuse the same immutable choice of wrappers.By structural induction on the wrapper chain, the base sends to the empty subset with zero cost; one additional wrapper preserves all prior sends and adds exactly its channel and charge. Thus the sends and charge are composed from the same selected components. There are channel-specific classes instead of one class per subset, and a new channel needs one new wrapper. A direct manual construction containing the same wrapper twice would intentionally send and charge twice, so the factory prevents that configuration.
cost computes a per-message amount rather than charging by itself; a later payment mechanism can use it. The interface uses Double, so numerical tests should allow ordinary floating-point rounding. There are unlisted articles, also show them or only show them.

