{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"scicode","formal_name":"SciCode","introduction":"科学研究の問題をコードで解く能力を評価するベンチマークです。親問題を複数の小問題に分けており、今回のdev取得では15親問題と50小問題の関係を保持します。\n\nSciCode evaluates the ability to solve scientific research problems through code. Problems are decomposed into subproblems; this dev import preserves the relationships between 15 parent problems and 50 subproblems.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://huggingface.co/datasets/SciCode1/SciCode","indexing_mode":"noindex"},"task_id":"479386a0-39e8-5d2d-8d47-f9fd5566dd2c","task_key":"dev--1","task_revision_id":"2","upstream_id":"1","short_description":"CG","config":"","split":"dev","body":"{\"problem_background_main\":\"Background:\\nThe conjugate gradient method finds a unique minimizer of the quadratic form\\n\\\\begin{equation}\\nf(\\\\mathbf{x})=\\\\frac{1}{2} \\\\mathbf{x}^{\\\\top} \\\\mathbf{A} \\\\mathbf{x}-\\\\mathbf{x}^{\\\\top} \\\\mathbf{A} \\\\mathbf{x}, \\\\quad \\\\mathbf{x} \\\\in \\\\mathbf{R}^n .\\n\\\\end{equation}\\nThe unique minimizer is evident due to the symmetry and positive definiteness of its Hessian matrix of second derivatives, and the fact that the minimizer, satisfying $\\\\nabla f(x)=\\\\mathbf{A x}-\\\\mathbf{b}=0$, solves the initial problem.\\n\\nThis implies choosing the initial basis vector $p_0$ as the negation of the gradient of $f$ at $x=x_0$. The gradient of ff is $Ax−b$. Beginning with an initial guess $x_0$, this implies setting $p_0=b−Ax_0$. The remaining basis vectors will be conjugate to the gradient, hence the name \\\"conjugate gradient method\\\". Note that $p_0$ is also the residual generated by this initial algorithm step.\\n\\nThe conjugation constraint is similar to an orthonormality constraint, which allows us to view the algorithm as an instance of Gram-Schmidt orthonormalization. This leads to the following expression:\\n$$\\n\\\\mathbf{p}_k=\\\\mathbf{r}_k-\\\\sum_{i<k} \\\\frac{\\\\mathbf{p}_i^{\\\\top} \\\\mathbf{A} \\\\mathbf{p}_k}{\\\\mathbf{p}_i^{\\\\top} \\\\mathbf{A} \\\\mathbf{p}_i} \\\\mathbf{p}_i\\n$$\\nThe next optimal location is therefore given by\\n$$\\n\\\\mathbf{x}_{k+1}=\\\\mathbf{x}_k+\\\\alpha_k \\\\mathbf{p}_k\\n$$\\nwith\\n$$\\n\\\\alpha_k=\\\\frac{\\\\mathbf{p}_k^{\\\\top}\\\\left(\\\\mathbf{b}-\\\\mathbf{A} \\\\mathbf{x}_k\\\\right)}{\\\\mathbf{p}_k^{\\\\top} \\\\mathbf{A} \\\\mathbf{p}_k}=\\\\frac{\\\\mathbf{p}_k^{\\\\top} \\\\mathbf{r}_k}{\\\\mathbf{p}_k^{\\\\top} \\\\mathbf{A} \\\\mathbf{p}_k},\\n$$\",\"problem_description_main\":\"Create a function to solve the linear system $\\\\mathbf{A} \\\\mathbf{x} = \\\\mathbf{b}$ using the conjugate gradient method. This function takes a matrix $\\\\mathbf{A}$ and a vector $\\\\mathbf{b}$ as inputs.\",\"problem_io\":\"\\\"\\\"\\\"\\nInputs:\\nA : Matrix, 2d array size M * M\\nb : Vector, 1d array size M\\nx : Initial guess vector, 1d array size M\\ntol : tolerance, float\\n\\nOutputs:\\nx : solution vector, 1d array size M\\n\\\"\\\"\\\"\",\"problem_name\":\"CG\",\"required_dependencies\":\"import numpy as np\"}","display_format":"scicode","language":"","answer_status":"published","assets":[],"source_url":"https://huggingface.co/datasets/SciCode1/SciCode","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}