Starlink Beam Planning: Assign Users to Satellites Under Angle, Band and Capacity Rules

Quick Overview

A satellite beam-planning exercise: assign ground users to Starlink satellites to serve as many as possible under a 45-degree visibility cone, 32 users and 4 frequency bands per satellite, 10-degree same-band separation and 20-degree protection from geostationary satellites. It tests 3D vector geometry and heuristics for constrained assignment.

Starlink Beam Planning: Assign Users to Satellites Under Angle, Band and Capacity Rules

Company: Spacex

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Technical Screen

A low-Earth-orbit broadband constellation (Starlink) must decide which satellite serves each user on the ground. You are given the 3D positions of the users, of the Starlink satellites, and of non-Starlink geostationary satellites that already transmit to the ground. Produce an assignment that serves as many users as possible while respecting every rule below. A served user gets exactly one satellite and one of that satellite's frequency bands; a user who cannot be served without breaking a rule is left unserved. - **Capacity:** a Starlink satellite serves at most 32 users. - **Bands:** each satellite has at most 4 frequency bands. - **Visibility:** a user can see, and be served by, a satellite only if the angle between the user's vertical (straight overhead) and the direction from the user to the satellite is less than 45 degrees. - **Same-band separation:** if two users served by the same satellite are less than 10 degrees apart as seen from that satellite, they must be on different bands. - **Geostationary interference:** if a user is receiving data from a non-Starlink geostationary satellite, then, as seen from that user, the angle between that geostationary satellite and the Starlink satellite serving the user must be greater than 20 degrees. Assume all positions are given in one Earth-centred Cartesian frame and that the Earth is treated as a sphere, so a user's vertical points from the Earth's centre through the user. Confirm both with the interviewer. ### Clarifying Questions - Which users receive from which geostationary satellites: is that listed per user, or must every user be protected from every listed geostationary satellite? - Are the thresholds exact at the boundary (exactly 45, 10 or 20 degrees), and what numeric tolerance does the checker allow? - Is the score simply the number of users served, or are some users worth more than others? - How many users and satellites does the largest input have, and is there a run-time limit? - What output format does the checker expect for served and unserved users? ### Part 1 — Compute the angles Write the geometry for the three angle rules: the visibility angle at the user, the separation between a Starlink satellite and a geostationary satellite as seen from the user, and the separation between two users as seen from a satellite. ```hint Name the vertex Each rule measures an angle at a different point. Write each one as the angle between two direction vectors that start at that point. ``` #### What This Part Should Cover - The correct vertex and direction vectors for each of the three angles - A numerically safe way to compute or compare the angles - Consistent handling of the strict and non-strict thresholds ### Part 2 — Find each user's candidate satellites For every user, determine which satellites could serve them before any capacity or band limit applies, and decide what this information tells you about the order in which to handle users. ```hint Scarce options first Some users can reach only one or two satellites while others can reach many. Ask what happens to a user with one option if a user with many options takes the last slot first. ``` #### What This Part Should Cover - Combining the visibility and geostationary rules into a per-user candidate list - Users with no candidate at all - The cost of testing every user against every satellite, and how to prune it for large inputs - An ordering of users with a deterministic tie-break ### Part 3 — Assign satellites and bands Assign users to satellites and bands so that no satellite exceeds 32 users or 4 bands and no two users on the same satellite and band are less than 10 degrees apart, aiming to serve as many users as possible. Then verify the result. ```hint Bands as labels Within one satellite, the 10-degree rule is a conflict between pairs of users, and each user needs one of four labels. Think about how to pick a label so that later users still have room. ``` #### What This Part Should Cover - How a satellite is chosen among a user's candidates and how a band is chosen on it - What happens when a user fits nowhere, and whether earlier choices can be repaired - An independent check of every rule on the final assignment - The time complexity of the whole pipeline ### What a Strong Answer Covers - Translates every rule into vector geometry measured at the right point - Separates candidate generation from assignment and justifies the order in which users are handled - Respects capacity, the band count and same-band separation in every placement - Recognizes that maximizing served users is a hard combinatorial problem, justifies a heuristic, and has a way to judge how far it is from optimal - Validates the output against all rules and handles degenerate inputs such as users with no visible satellite ### Follow-up Questions - After the first pass, some users are unserved although one of their candidate satellites still has free slots. How would you try to place them? - With far more users and satellites, how would you avoid testing every user against every satellite? - How would you estimate how many users an optimal assignment could serve, to judge your heuristic? - If the satellites move and the assignment has to be recomputed periodically, what would you reuse from the previous plan?

Overview: A satellite beam-planning exercise: assign ground users to Starlink satellites to serve as many as possible under a 45-degree visibility cone, 32 users and 4 frequency bands per satellite, 10-degree same-band separation and 20-degree protection from geostationary satellites. It tests 3D vector geometry and heuristics for constrained assignment.

Read the full Spacex Software Engineer interview experience this question came from

Spacex logo
Spacex
Nov 7, 2026
hardSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
2
0

A low-Earth-orbit broadband constellation (Starlink) must decide which satellite serves each user on the ground. You are given the 3D positions of the users, of the Starlink satellites, and of non-Starlink geostationary satellites that already transmit to the ground. Produce an assignment that serves as many users as possible while respecting every rule below. A served user gets exactly one satellite and one of that satellite's frequency bands; a user who cannot be served without breaking a rule is left unserved.

  • Capacity: a Starlink satellite serves at most 32 users.
  • Bands: each satellite has at most 4 frequency bands.
  • Visibility: a user can see, and be served by, a satellite only if the angle between the user's vertical (straight overhead) and the direction from the user to the satellite is less than 45 degrees.
  • Same-band separation: if two users served by the same satellite are less than 10 degrees apart as seen from that satellite, they must be on different bands.
  • Geostationary interference: if a user is receiving data from a non-Starlink geostationary satellite, then, as seen from that user, the angle between that geostationary satellite and the Starlink satellite serving the user must be greater than 20 degrees.

Assume all positions are given in one Earth-centred Cartesian frame and that the Earth is treated as a sphere, so a user's vertical points from the Earth's centre through the user. Confirm both with the interviewer.

Clarifying Questions Guidance

  • Which users receive from which geostationary satellites: is that listed per user, or must every user be protected from every listed geostationary satellite?
  • Are the thresholds exact at the boundary (exactly 45, 10 or 20 degrees), and what numeric tolerance does the checker allow?
  • Is the score simply the number of users served, or are some users worth more than others?
  • How many users and satellites does the largest input have, and is there a run-time limit?
  • What output format does the checker expect for served and unserved users?

Part 1 — Compute the angles

Write the geometry for the three angle rules: the visibility angle at the user, the separation between a Starlink satellite and a geostationary satellite as seen from the user, and the separation between two users as seen from a satellite.

What This Part Should Cover Guidance

  • The correct vertex and direction vectors for each of the three angles
  • A numerically safe way to compute or compare the angles
  • Consistent handling of the strict and non-strict thresholds

Part 2 — Find each user's candidate satellites

For every user, determine which satellites could serve them before any capacity or band limit applies, and decide what this information tells you about the order in which to handle users.

What This Part Should Cover Guidance

  • Combining the visibility and geostationary rules into a per-user candidate list
  • Users with no candidate at all
  • The cost of testing every user against every satellite, and how to prune it for large inputs
  • An ordering of users with a deterministic tie-break

Part 3 — Assign satellites and bands

Assign users to satellites and bands so that no satellite exceeds 32 users or 4 bands and no two users on the same satellite and band are less than 10 degrees apart, aiming to serve as many users as possible. Then verify the result.

What This Part Should Cover Guidance

  • How a satellite is chosen among a user's candidates and how a band is chosen on it
  • What happens when a user fits nowhere, and whether earlier choices can be repaired
  • An independent check of every rule on the final assignment
  • The time complexity of the whole pipeline

What a Strong Answer Covers Guidance

  • Translates every rule into vector geometry measured at the right point
  • Separates candidate generation from assignment and justifies the order in which users are handled
  • Respects capacity, the band count and same-band separation in every placement
  • Recognizes that maximizing served users is a hard combinatorial problem, justifies a heuristic, and has a way to judge how far it is from optimal
  • Validates the output against all rules and handles degenerate inputs such as users with no visible satellite

Follow-up Questions Guidance

  • After the first pass, some users are unserved although one of their candidate satellites still has free slots. How would you try to place them?
  • With far more users and satellites, how would you avoid testing every user against every satellite?
  • How would you estimate how many users an optimal assignment could serve, to judge your heuristic?
  • If the satellites move and the assignment has to be recomputed periodically, what would you reuse from the previous plan?