Benchmark AI / Public workspace

SciCode / 38.2 / Given three vectors, provide a function that returns the reciprocal vectors of…

Problem

Answer published by the source. Consult the official source to check your work against its answer.

step background

Background For the input vectors a1\overrightarrow{a_1}, a2\overrightarrow{a_2}, a3\overrightarrow{a_3}, the reciprocal vectors are $$ \begin{aligned} & \overrightarrow{b_1}=2 \pi \frac{\overrightarrow{a_2} \times \overrightarrow{a_3}}{\overrightarrow{a_1} \cdot\left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)} \\ & \overrightarrow{b_2}=2 \pi \frac{\overrightarrow{a_3} \times \overrightarrow{a_1}}{\overrightarrow{a_1} \cdot \left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)} \\ & \overrightarrow{b_3}=2 \pi \frac{\overrightarrow{a_1} \times \overrightarrow{a_2}}{\overrightarrow{a_1} \cdot\left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)} \end{aligned} $$
Plain-text mathematical notation (without MathML)
Background

For the input vectors (a₁)→, (a₂)→, (a₃)→, the reciprocal vectors are

$$
\begin{aligned}
& \overrightarrow{b_1}=2 \pi \frac{\overrightarrow{a_2} \times \overrightarrow{a_3}}{\overrightarrow{a_1} \cdot\left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)} \\
& \overrightarrow{b_2}=2 \pi \frac{\overrightarrow{a_3} \times \overrightarrow{a_1}}{\overrightarrow{a_1} \cdot \left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)} \\
& \overrightarrow{b_3}=2 \pi \frac{\overrightarrow{a_1} \times \overrightarrow{a_2}}{\overrightarrow{a_1} \cdot\left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)}
\end{aligned}
$$
Original LaTeX notation
Background

For the input vectors $\overrightarrow{a_1}$, $\overrightarrow{a_2}$, $\overrightarrow{a_3}$, the reciprocal vectors are

$$
\begin{aligned}
& \overrightarrow{b_1}=2 \pi \frac{\overrightarrow{a_2} \times \overrightarrow{a_3}}{\overrightarrow{a_1} \cdot\left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)} \\
& \overrightarrow{b_2}=2 \pi \frac{\overrightarrow{a_3} \times \overrightarrow{a_1}}{\overrightarrow{a_1} \cdot \left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)} \\
& \overrightarrow{b_3}=2 \pi \frac{\overrightarrow{a_1} \times \overrightarrow{a_2}}{\overrightarrow{a_1} \cdot\left(\overrightarrow{a_2} \times \overrightarrow{a_3}\right)}
\end{aligned}
$$

step description prompt

Given three vectors, provide a function that returns the reciprocal vectors of the input. The input is a list of three numpy arrays and the output should also be a list of three numpy arrays.

Discussion

Discussion

No discussion posts on this page yet. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Source and history

Official source

initial import